|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectgeneticWedge.gp.Component
geneticWedge.gp.function.Function
public abstract class Function
The abstract parent of all Functions. Functions are Components that are used within a tree, i.e. not at its leaves. They must be able to calculate an output given an array of inputs. Generally the input array must be of a specific length otherwise an InvalidInputSizeException will be thrown upon calling getOutput().
Constructor Summary | |
---|---|
Function()
|
Method Summary | |
---|---|
int |
getComplexity()
Should return the complexity of the Function. |
int |
getNoOfInputs()
Should return the length of the array required by getOutput() |
abstract double |
getOutput(double[] inputs)
All non-abstract subclasses must implement this method, so that they can transform inputs into a single output. |
abstract java.lang.String |
toString()
Returns a String representation of this Function object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Function()
Method Detail |
---|
public abstract double getOutput(double[] inputs) throws InvalidInputSizeException
InvalidInputSizeException
public abstract java.lang.String toString()
toString
in class Component
public int getNoOfInputs()
public int getComplexity()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |