Class SignFunction

java.lang.Object
com.graphbuilder.math.func.SignFunction
All Implemented Interfaces:
Function

public class SignFunction extends Object implements Function
The sign function.
  • Constructor Details

    • SignFunction

      public SignFunction()
  • Method Details

    • of

      public double of(double[] d, int numParam)
      The sign function returns 1 if the d[0] > 0, -1 if d[0] < 0, else 0.
      Specified by:
      of in interface Function
    • acceptNumParam

      public boolean acceptNumParam(int numParam)
      Returns true only for 1 parameter, false otherwise.
      Specified by:
      acceptNumParam in interface Function
    • toString

      public String toString()
      Overrides:
      toString in class Object