Class LambdaFunction

    • Constructor Detail

      • LambdaFunction

        public LambdaFunction​(Jep jep,
                              java.lang.String funName,
                              java.lang.String parameter,
                              java.lang.String expression)
        Create a function with a single arguments defined by an expression.
        Parameters:
        jep - The jep instance
        funName - name of the function
        parameter - the name of the formal parameter.
        expression -
      • LambdaFunction

        public LambdaFunction​(Jep jep,
                              java.lang.String funName,
                              java.lang.String[] parameters,
                              java.lang.String expression)
        Create a function with two or more arguments defined by an expression.
        Parameters:
        jep - The jep instance
        funName - name of the function
        parameters - an array of the formal parameter names used by the function
        expression -
      • LambdaFunction

        public LambdaFunction​(java.lang.String funName,
                              java.lang.String[] parameters,
                              java.lang.String expression)
        Create a function with two or more arguments defined by an expression. Use this method for recursive functions like factorial. The MacroFunction.init(Jep) method must be called after the function is added to the function table, which will recompile the function.
        Parameters:
        funName - name of the function
        parameters - an array of the formal parameter names used by the function
        expression -
      • LambdaFunction

        public LambdaFunction​(java.lang.String funName,
                              java.lang.String[] parameters,
                              java.lang.String expression,
                              Node root)
        Create a function with a node tree. The ImportationVisitor is used to convert the tree into context for this object.
        Parameters:
        funName - function name
        parameters - list of parameters
        expression - string representation of equation
        root - root of expressions tree.
    • Method Detail

      • toString

        public java.lang.String toString()
        Prints the function in the form [x,y]=>x^2+y^2
        Overrides:
        toString in class MacroFunction