API documentation of the 'jhplot.math.exp4j.function.Function' Java class
Function
jhplot.math.exp4j.function

Class Function

Function
jhplot.math.exp4j.function

Class Function



  • public abstract class Functionextends java.lang.Object
    A class representing a Function which can be used in an expression
    • Constructor Summary

      Constructors 
      Constructor and Description
      Function(java.lang.String name)
      Create a new Function with a given name that takes a single argument
      Function(java.lang.String name, int numArguments)
      Create a new Function with a given name and number of arguments
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethod and Description
      abstract doubleapply(double... args)
      Method that does the actual calculation of the function value given the arguments
      static char[]getAllowedFunctionCharacters()
      Deprecated. 
      since 0.4.5 All unicode letters are allowed to be used in function names since 0.4.3. This API Function can be safely ignored. Checks for function name validity can be done using Character.isLetter() et al.
      java.lang.StringgetName()
      Get the name of the Function
      intgetNumArguments()
      Get the number of arguments for this function
      static booleanisValidFunctionName(java.lang.String name) 
      • Methods inherited from class java.lang.Object

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

      • Function

        public Function(java.lang.String name,                int numArguments)
        Create a new Function with a given name and number of arguments
        Parameters:
        name - the name of the Function
        numArguments - the number of arguments the function takes
      • Function

        public Function(java.lang.String name)
        Create a new Function with a given name that takes a single argument
        Parameters:
        name - the name of the Function
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the name of the Function
        Returns:
        the name
      • getNumArguments

        public int getNumArguments()
        Get the number of arguments for this function
        Returns:
        the number of arguments
      • apply

        public abstract double apply(double... args)
        Method that does the actual calculation of the function value given the arguments
        Parameters:
        args - the set of arguments used for calculating the function
        Returns:
        the result of the function evaluation
      • getAllowedFunctionCharacters

        public static char[] getAllowedFunctionCharacters()
        Deprecated. since 0.4.5 All unicode letters are allowed to be used in function names since 0.4.3. This API Function can be safely ignored. Checks for function name validity can be done using Character.isLetter() et al.
        Get the set of characters which are allowed for use in Function names.
        Returns:
        the set of characters allowed
      • isValidFunctionName

        public static boolean isValidFunctionName(java.lang.String name)

DMelt 2.1 © DataMelt by jWork.ORG