FND
jhplot

Class FND

  • All Implemented Interfaces:
    Serializable


    public class FNDextends DrawOptionsimplements Serializable
    Create a function in multiple dimensions. The function name could have parameters named in unique way as P0, P1, P2 ... They have to be replaced with values using setPar() method for evaluation
    See Also:
    Serialized Form
    • Constructor Detail

      • FND

        public FND(String title,   String name,   String vars)
        Create a function in any dimension evaluation. The function may have many independent variables.

        List of commands

        • ( ) parenthesis , comma
        • +, -, unary -, unary +
        • *, /
        • ^ (raise to a power)
        • pi, e, All the constants in class SpecialFunction
        • log
        • sin, cos, tan, sinh, cosh, tanh
        • asin, acos, atan, asinh, acosh, atanh
        • sqrt
        • rand
        • exp
        • remainder
        • atan2
        • Special functions and constants. Look at the book
        • All the functions in class SpecialFunction
        • Independent variables x
        • Scientific notation using "e", "E", "d", "D".
        Parameters:
        name - String representing the function
        vars - String representing variables. Each variable should be separated by a comma. Example "x,y,z"
      • FND

        public FND(String name,   String vars)
        Build a function, setting its title to the definition.
        Parameters:
        title - Title
        name - name
        vars - Options
    • Method Detail

      • setComplex

        public void setComplex()
        Treat the function as complex.
      • simplify

        public void simplify()
        Treat the function as complex.
      • diff

        public void diff(String var)
        differentiate the expression and simplify
        Parameters:
        var - variable used for differentiation
      • getVars

        public String[] getVars()
        Return all variables
        Returns:
        array array with variables
      • eval

        public double eval(String vars)
        Evaluate a function at a specific point in x
        Parameters:
        vars - Values for evaluation separated by commas, x=1,y=2,z=3
        Returns:
        function value at x
      • eval

        public boolean eval(String indvars,           double xmin,           double xmax,           String vars)
        Evaluate a function at a specific point for one single variable. Evaluation is done between xmin and xmax
        Parameters:
        indvars - Define independent variable, like 'x' Only one variable is allowed
        xmin - xmin value for independent varible
        xmax - xmax value for independent varible
        vars - define values for other variables, like 'y=1,z=3'
        Returns:
        true if no errors
      • eval

        public boolean eval(String indvars,           double xmin,           double xmax)
        Evaluate a function at a specific point for one single variable. Evaluation is done between xmin and xmax. It is assumed that there are no any other variable involved
        Parameters:
        indvars - Define independent variable, like 'x' Only one variable is allowed
        xmin - xmin value for independent varible
        xmax - xmax value for independent varible
        Returns:
        true if no errors
      • isEvaluated

        public boolean isEvaluated()
        Is the function was evaluated?
      • getX

        public double getX(int i)
        Get value in X-axis
        Parameters:
        i - index
        Returns:
        value in X
      • getY

        public double getY(int i)
        Get value in Y-axis
        Parameters:
        i - index
        Returns:
        value in Y
      • setName

        public void setName(String name)
        Sets a name of the function, i.e. what will be used for evaluation
        Parameters:
        name - Name
      • getName

        public String getName()
        Get the name of the function used for evaluation
        Returns:
        Name
      • getVarString

        public String getVarString()
        Get arguments of the function (independent variables).
        Returns:
        arguments
      • doc

        public void doc()
        Show online documentation.
      • setMin

        public void setMin(double min)
        Set Min value in X
        Parameters:
        min - Minimum value
      • getMin

        public double getMin()
        Get the minimum value in X
        Returns:
        min Minimum value
      • setMax

        public void setMax(double max)
        Set the maximum value in X
        Parameters:
        max - Maximal value
      • getMax

        public double getMax()
        Get the maximum value in X
        Returns:
        Maximal value
      • setPoints

        public void setPoints(int bins)
        Sets the number points between Min and Max for evaluation
        Parameters:
        bins - Number of points
      • getPoints

        public int getPoints()
        Get the number of points
        Returns:
        Number of points
      • getFixedVars

        public String getFixedVars()
        String with fixed variables
        Returns:
        String with fixed variables

SCaVis 1.7 © jWork.org