Package evo.search.ga

Class DiscreteChromosome

    • Field Summary

      • Fields inherited from class io.jenetics.AbstractChromosome

        _genes, _valid
    • Constructor Detail

      • DiscreteChromosome

        public DiscreteChromosome​(io.jenetics.util.ISeq<? extends DiscreteGene> genes)
        Create a new DiscreteChromosome from the given genes array.
        Parameters:
        genes - the genes that form the chromosome.
        Throws:
        NullPointerException - if the given gene array is null.
        IllegalArgumentException - if the length of the gene sequence is empty.
      • DiscreteChromosome

        public DiscreteChromosome​(DiscreteGene... genes)
        Create a new DiscreteChromosome from the given genes array.
        Parameters:
        genes - the genes that form the chromosome.
        Throws:
        NullPointerException - if the given gene array is null.
        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:
        newInstance in interface io.jenetics.Chromosome<DiscreteGene>
      • newInstance

        public io.jenetics.Chromosome<DiscreteGene> newInstance()
        Specified by:
        newInstance in interface io.jenetics.util.Factory<io.jenetics.Chromosome<DiscreteGene>>
      • serialize

        public org.dom4j.Element serialize()
        Description copied from interface: XmlEntity
        Serialize the entity into a Element.
        Specified by:
        serialize in interface XmlEntity<DiscreteChromosome>
        Returns:
        serialized document