org.encog.ml.genetic.genome
public class DoubleArrayGenome extends BasicGenome implements ArrayGenome
Constructor and Description |
---|
DoubleArrayGenome(DoubleArrayGenome other)
Construct a genome based on another genome.
|
DoubleArrayGenome(int size)
Construct a genome of a specific size.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(ArrayGenome source,
int sourceIndex,
int targetIndex)
Copy elements from another array genome into this one.
|
void |
copy(Genome source)
Copy from the specified genome into this one.
|
double[] |
getData() |
int |
size() |
void |
swap(int iswap1,
int iswap2)
Swap two elements in this genome.
|
getAdjustedScore, getBirthGeneration, getPopulation, getScore, getSpecies, setAdjustedScore, setBirthGeneration, setPopulation, setScore, setSpecies, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAdjustedScore, getBirthGeneration, getPopulation, getScore, getSpecies, setAdjustedScore, setBirthGeneration, setPopulation, setScore, setSpecies
public DoubleArrayGenome(int size)
size
- The size.public DoubleArrayGenome(DoubleArrayGenome other)
other
- public int size()
public void copy(ArrayGenome source, int sourceIndex, int targetIndex)
copy
in interface ArrayGenome
source
- The source genome.sourceIndex
- The source index.targetIndex
- The target index.public double[] getData()
public void copy(Genome source)
public void swap(int iswap1, int iswap2)
swap
in interface ArrayGenome
iswap1
- The first element index to swap.iswap2
- The second element index to swap.Copyright © 2014. All Rights Reserved.