DoubleArrayGenome
org.encog.ml.genetic.genome

Class DoubleArrayGenome

    • Constructor Detail

      • DoubleArrayGenome

        public DoubleArrayGenome(int size)
        Construct a genome of a specific size.
        Parameters:
        size - The size.
      • DoubleArrayGenome

        public DoubleArrayGenome(DoubleArrayGenome other)
        Construct a genome based on another genome.
        Parameters:
        other -
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface Genome
        Returns:
        Return the size of this genome. This size is a relative number that indicates the complexity of the genome.
      • copy

        public void copy(ArrayGenome source,        int sourceIndex,        int targetIndex)
        Copy elements from another array genome into this one.
        Specified by:
        copy in interface ArrayGenome
        Parameters:
        source - The source genome.
        sourceIndex - The source index.
        targetIndex - The target index.
      • getData

        public double[] getData()
        Returns:
        The data.
      • copy

        public void copy(Genome source)
        Copy from the specified genome into this one.
        Specified by:
        copy in interface Genome
        Parameters:
        source - The source genome.
      • swap

        public void swap(int iswap1,        int iswap2)
        Swap two elements in this genome.
        Specified by:
        swap in interface ArrayGenome
        Parameters:
        iswap1 - The first element index to swap.
        iswap2 - The second element index to swap.

SCaVis 2.0 © jWork.ORG