Documentation of 'vmm3d.functions.Function' Java class
Function
vmm3d.functions

Class Function

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getArity()
      Get the number of arguments required by this function.
      java.lang.String getName()
      Get the name of the Function.
      void setName(java.lang.String name)
      Change the name of this function.
      double value(double[] argumentValues)
      Find the value of this function for a specified list of arguments.
      double value(double[] argumentValues, EvalStack stack)
      Find the value of this function for a specified list of arguments.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the name of the Function. The name was specified in the call to Parser.parseFunction(String, String, String[]) that created this function. It can be null. A non-null name is really only required if this Function is to be added to a Parser so that it can be used in expressions that are parsed by that parser.
      • setName

        public void setName(java.lang.String name)
        Change the name of this function. It should not be changed after the function has been added to a Parser; even if it is changed, the Parser will continue to use the old name.
      • getArity

        public int getArity()
        Get the number of arguments required by this function.
      • value

        public double value(double[] argumentValues)
        Find the value of this function for a specified list of arguments. This method evaluates the function using an EvalStack that is unique to the current Thread, which allows thread-safe evaluation.
        Parameters:
        argumentValues - The length of this array must be the same as the number of arguments of the function. If the function has arrity zero, then the argumentValues array can be null.
        Returns:
        the value of the function at the specified arguments.
        Throws:
        java.lang.IllegalArgumentException - if the number of arguments is incorrect.
      • value

        public double value(double[] argumentValues,
                            EvalStack stack)
        Find the value of this function for a specified list of arguments. This method evaluates the function using an EvalStack that is provided as a parameter to this method.
        Parameters:
        argumentValues - the values of the arguments. The length of this array must be the same as the number of arguments of the function. If the function has arrity zero, then the argumentValues array can be null.
        stack - a non-null EvalStack that will be used for computing the value of this Function
        Returns:
        the value of the function at the specified arguments.
        Throws:
        java.lang.IllegalArgumentException - if the number of arguments is incorrect.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.