geneticWedge.gp.function
Class DivisionFunction

java.lang.Object
  extended by geneticWedge.gp.Component
      extended by geneticWedge.gp.function.Function
          extended by geneticWedge.gp.function.TwoInputFunction
              extended by geneticWedge.gp.function.DivisionFunction

public class DivisionFunction
extends TwoInputFunction

DivisionFunction is a Function that takes 2 inputs and outputs the first divided by the second.


Constructor Summary
DivisionFunction()
          constructor
 
Method Summary
 double getOutput(double[] input)
          This method performs protected division.
 boolean isCommutative()
          Returns false
 java.lang.String toString()
          Returns a String representation of a DivisionFunction object ('÷').
 
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

DivisionFunction

public DivisionFunction()
constructor

Method Detail

getOutput

public double getOutput(double[] input)
                 throws InvalidInputSizeException
This method performs protected division. Division by 0.0 therefore results in an output of 0.0 (not NaN).

Specified by:
getOutput in class Function
Throws:
InvalidInputSizeException

toString

public java.lang.String toString()
Returns a String representation of a DivisionFunction object ('÷').

Specified by:
toString in class Function

isCommutative

public boolean isCommutative()
Returns false

Specified by:
isCommutative in class TwoInputFunction