|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.filters.supervised.attribute.gpattributegeneration.Gene
public class Gene
Stores a gene node Ported from C#.
Constructor Summary | |
---|---|
Gene()
An empty Gene |
|
Gene(java.lang.String geneValue,
EnumGeneType gType)
A gene with the given value |
Method Summary | |
---|---|
void |
generateValue(java.util.Random rand,
java.util.ArrayList<java.lang.String> funcSet,
int[] validAttributes)
Generate a random value for the Gene. |
void |
generateValue(java.util.Random rand,
EnumGeneType gType,
java.util.ArrayList<java.lang.String> funcSet,
int[] validAttributes)
Generate a random value for the gene of the specified type |
void |
generateValue(java.util.Random rand,
EnumGeneType gType,
java.util.ArrayList<java.lang.String> funcSet,
int arity,
int[] validAttributes)
Generate a random value for the gene of the specified type taking into account the arity desired |
EnumGeneType |
getType()
Returns the type of the gene |
java.lang.String |
getValue()
Returns the Gene's value |
void |
setType(EnumGeneType gType)
Sets whether the node is a terminal or function |
java.lang.String |
toString()
Returns the string representation of the gene |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Gene()
public Gene(java.lang.String geneValue, EnumGeneType gType)
geneValue
- The value to give the geneisTerminal
- Whether the gene is a terminal or function nodeMethod Detail |
---|
public EnumGeneType getType()
public void setType(EnumGeneType gType)
isTerminal
- True if Gene is a terminal; False if a function nodepublic java.lang.String getValue()
public void generateValue(java.util.Random rand, java.util.ArrayList<java.lang.String> funcSet, int[] validAttributes)
rand
- The Random generator to usefuncSet
- The set of available functionsvalidAttributes
- the valid numeric attributes that can be used as part of equationspublic void generateValue(java.util.Random rand, EnumGeneType gType, java.util.ArrayList<java.lang.String> funcSet, int[] validAttributes)
rand
- The Random generator to usegType
- Specifies whether a function or terminal should be generatedfuncSet
- The set of available functionsvalidAttributes
- the valid numeric attributes that can be used as part of equationspublic void generateValue(java.util.Random rand, EnumGeneType gType, java.util.ArrayList<java.lang.String> funcSet, int arity, int[] validAttributes)
rand
- The Random generator to useisTerminal
- Specifies whether a function or terminal should be generatedfuncSet
- The set of available functionsarity
- The desired arityvalidAttributes
- the valid numeric attributes that can be used as part of equationspublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |