Package evo.search.ga
Class DiscreteChromosome
- java.lang.Object
-
- io.jenetics.AbstractChromosome<DiscreteGene>
-
- evo.search.ga.DiscreteChromosome
-
- All Implemented Interfaces:
XmlEntity<DiscreteChromosome>,io.jenetics.Chromosome<DiscreteGene>,io.jenetics.util.BaseSeq<DiscreteGene>,io.jenetics.util.Factory<io.jenetics.Chromosome<DiscreteGene>>,io.jenetics.util.Verifiable,Serializable,Iterable<DiscreteGene>,RandomAccess
public class DiscreteChromosome extends io.jenetics.AbstractChromosome<DiscreteGene> implements XmlEntity<DiscreteChromosome>
Chromosome consisting of a permutations of the distances from theConfigurationin an evolved order associated with valid positional indices.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DiscreteChromosome(DiscreteGene... genes)Create a newDiscreteChromosomefrom the givengenesarray.DiscreteChromosome(io.jenetics.util.ISeq<? extends DiscreteGene> genes)Create a newDiscreteChromosomefrom the givengenesarray.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.jenetics.Chromosome<DiscreteGene>newInstance()io.jenetics.Chromosome<DiscreteGene>newInstance(io.jenetics.util.ISeq<DiscreteGene> genes)DiscreteChromosomeparse(org.dom4j.Element element)Parse aElementand return the entity.org.dom4j.Elementserialize()Serialize the entity into aElement.-
Methods inherited from class io.jenetics.AbstractChromosome
equals, get, hashCode, isValid, length, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
DiscreteChromosome
public DiscreteChromosome(io.jenetics.util.ISeq<? extends DiscreteGene> genes)
Create a newDiscreteChromosomefrom the givengenesarray.- Parameters:
genes- the genes that form the chromosome.- Throws:
NullPointerException- if the given gene array isnull.IllegalArgumentException- if the length of the gene sequence is empty.
-
DiscreteChromosome
public DiscreteChromosome(DiscreteGene... genes)
Create a newDiscreteChromosomefrom the givengenesarray.- Parameters:
genes- the genes that form the chromosome.- Throws:
NullPointerException- if the given gene array isnull.IllegalArgumentException- if the length of the gene sequence is empty.
-
-
Method Detail
-
newInstance
public io.jenetics.Chromosome<DiscreteGene> newInstance(io.jenetics.util.ISeq<DiscreteGene> genes)
- Specified by:
newInstancein interfaceio.jenetics.Chromosome<DiscreteGene>
-
newInstance
public io.jenetics.Chromosome<DiscreteGene> newInstance()
- Specified by:
newInstancein interfaceio.jenetics.util.Factory<io.jenetics.Chromosome<DiscreteGene>>
-
serialize
public org.dom4j.Element serialize()
Description copied from interface:XmlEntitySerialize the entity into aElement.- Specified by:
serializein interfaceXmlEntity<DiscreteChromosome>- Returns:
- serialized document
-
parse
public DiscreteChromosome parse(org.dom4j.Element element)
Description copied from interface:XmlEntityParse aElementand return the entity.- Specified by:
parsein interfaceXmlEntity<DiscreteChromosome>- Parameters:
element- element to parse- Returns:
- parsed entity
-
-