Documentation of 'jhplot.FND' Java class.
FND
jhplot

Class FND

  • All Implemented Interfaces:
    java.io.Serializable


    public class FND
    extends DrawOptions
    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(java.lang.String title,
                   java.lang.String name,
                   java.lang.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(java.lang.String name,
                   java.lang.String vars)
        Build a function, setting its title to the definition.
        Parameters:
        title - Title
        name - name
        vars - Options
      • FND

        public FND(FProxy f)
        Initialize function from proxy.
        Parameters:
        f -
    • Method Detail

      • setComplex

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

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

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

        public java.lang.String[] getVars()
        Return all variables
        Returns:
        array array with variables
      • toString

        public java.lang.String toString()
        Convert to string
        Overrides:
        toString in class java.lang.Object
      • eval

        public double eval(java.lang.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(java.lang.String indvars,
                            double xmin,
                            double xmax,
                            java.lang.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(java.lang.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(java.lang.String name)
        Sets a name of the function, i.e. what will be used for evaluation
        Parameters:
        name - Name
      • get

        public FProxy get()
        Get the proxy of this function used for serialization and non-graphical representations.
        Parameters:
        proxy - proxy of this function.
      • getName

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

        public java.lang.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 java.lang.String getFixedVars()
        String with fixed variables
        Returns:
        String with fixed variables

DMelt 3.0 © DataMelt by jWork.ORG