Class NamedFunction

java.lang.Object
com.datalogics.PDFL.Function
com.datalogics.PDFL.NamedFunction

public class NamedFunction extends Function
Defines a function currently in use. A Function is a process; it takes input values and manipulates them to create output values.
  • Method Details

    • delete

      public void delete()
      Overrides:
      delete in class Function
    • equals

      public boolean equals(Object rhs)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Convert the function to a displayable string.
      Overrides:
      toString in class Function
    • getName

      public String getName()
      The name of the function.
    • getDomain

      public List<Double> getDomain()
      The domain of the function. 2 * m elements, where m is the number of inputs to the function.

      Throws a 'not implemented' exception for named functions.

      Overrides:
      getDomain in class Function
    • setDomain

      public void setDomain(List<Double> domain)
      The domain of the function. 2 * m elements, where m is the number of inputs to the function.

      Throws a 'not implemented' exception for named functions.

      Overrides:
      setDomain in class Function
    • getRange

      public List<Double> getRange()
      The range of the function. 2 * n elements, where n is the number of outputs from the function.

      Throws a 'not implemented' exception for named functions.

      Overrides:
      getRange in class Function
    • setRange

      public void setRange(List<Double> range)
      The range of the function. 2 * n elements, where n is the number of outputs from the function.

      Throws a 'not implemented' exception for named functions.

      Overrides:
      setRange in class Function
    • getNInputs

      public int getNInputs()
      The number of inputs to the function. Throws a 'not implemented' exception for named functions.
      Overrides:
      getNInputs in class Function
    • getNOutputs

      public int getNOutputs()
      The number of outputs from the function. Throws a 'not implemented' exception for named functions.
      Overrides:
      getNOutputs in class Function
    • apply

      public List<Double> apply(List<Double> args)
      Apply the function to supplied input values.

      For Identity functions, this returns the same inputs. Not defined for any other kinds of named functions.

      Overrides:
      apply in class Function
      Parameters:
      args - input values for the function. The number of input values must agree with the number of inputs the function takes.
      Returns:
      a list of the result values from the function