|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectgeneticWedge.gp.Component
geneticWedge.gp.Terminal
geneticWedge.gp.Constant
public class Constant
Constant is a type of terminal within a GP subtree. It always outputs the same value.
Constructor Summary | |
---|---|
Constant(double val)
The constructor sets the value of a Constant. |
Method Summary | |
---|---|
boolean |
equals(Constant comparison)
Returns true if this Constant has the same numerical value as the comparison object. |
double |
getValue()
Returns the value output by this Constant object. |
java.lang.String |
toString()
A Component must have a toString() method that allows an Individual to construct a String representation of its components. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Constant(double val)
Method Detail |
---|
public double getValue()
getValue
in class Terminal
public java.lang.String toString()
Component
toString
in class Component
public boolean equals(Constant comparison)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |