|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.javaGenes.core.Evolvable
gov.nasa.javaGenes.forceFields.Chromosome
Implement the representation of a two-dimensional array of double.
Field Summary | |
protected double[][] |
chromosome
|
Fields inherited from class gov.nasa.javaGenes.core.Evolvable |
childMakersUsed |
Constructor Summary | |
Chromosome(AlleleTemplate alleles)
Sets the array sizes to that of alleles. |
|
Chromosome(Chromosome c)
Creates a raise with the same structure as c, but does not copy the values |
|
Chromosome(TokenizeInput tokenizer)
Creates a new chromosome from within a checkpoint file |
Method Summary | |
void |
addArray(int size)
|
java.lang.Object |
clone()
deep copy |
Chromosome |
createDifferenceChromosome(Chromosome other)
|
Chromosome |
deepCopyChromosome()
|
double |
distanceFrom(Evolvable e)
Subclasses will almost always override this. |
double[] |
getArray(int i)
|
int |
getSize()
|
int |
getSize(int index)
|
double |
getValue(int i,
int j)
return the value at the indicated indices |
int |
numberOfArrays()
|
void |
setValue(double value,
int i,
int j)
set the value at the indicated indices |
void |
stateSave(TokenizeOutput tokenizer)
Save the state of a chromosome to a checkpoint file |
java.lang.String |
toString()
|
Methods inherited from class gov.nasa.javaGenes.core.Evolvable |
addChildMakers, copyForEvolution, getChildMakersUsed, getSmallest, prepareForEvaluator |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double[][] chromosome
Constructor Detail |
public Chromosome(AlleleTemplate alleles)
public Chromosome(Chromosome c)
public Chromosome(TokenizeInput tokenizer)
Method Detail |
public void addArray(int size)
public void stateSave(TokenizeOutput tokenizer)
stateSave
in class Evolvable
public int numberOfArrays()
public int getSize(int index)
public Chromosome deepCopyChromosome()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public double getValue(int i, int j)
public double[] getArray(int i)
public void setValue(double value, int i, int j)
public int getSize()
getSize
in class Evolvable
public double distanceFrom(Evolvable e)
Evolvable
distanceFrom
in class Evolvable
e
- must be a Chromosome with the same array structure as this
public Chromosome createDifferenceChromosome(Chromosome other)
public java.lang.String toString()
|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |