geneticWedge.gp.function
Class GREATER_THAN_EQUAL_ZEROFunction

java.lang.Object
  extended by geneticWedge.gp.Component
      extended by geneticWedge.gp.function.Function
          extended by geneticWedge.gp.function.OneInputFunction
              extended by geneticWedge.gp.function.GREATER_THAN_EQUAL_ZEROFunction

public class GREATER_THAN_EQUAL_ZEROFunction
extends OneInputFunction

A unary function that returns +1 if its input is greater than or equal to zero, -1 otherwise.


Constructor Summary
GREATER_THAN_EQUAL_ZEROFunction()
          constructor
 
Method Summary
 double getOutput(double[] input)
          getOutput() throws InvalidInputSizeException if the length of the input array is not 1.
 java.lang.String toString()
          Returns a String representation of a GREATER_THAN_EQUAL_ZEROFunction object ('>=ZERO').
 
Methods inherited from class geneticWedge.gp.function.Function
getComplexity, getNoOfInputs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GREATER_THAN_EQUAL_ZEROFunction

public GREATER_THAN_EQUAL_ZEROFunction()
constructor

Method Detail

getOutput

public double getOutput(double[] input)
                 throws InvalidInputSizeException
getOutput() throws InvalidInputSizeException if the length of the input array is not 1.

Specified by:
getOutput in class Function
Throws:
InvalidInputSizeException

toString

public java.lang.String toString()
Returns a String representation of a GREATER_THAN_EQUAL_ZEROFunction object ('>=ZERO').

Specified by:
toString in class Function