Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.ml.genetic.genome
Class IntegerArrayGenome

    java.lang.Object
      org.encog.ml.ea.genome.BasicGenome
          org.encog.ml.genetic.genome.IntegerArrayGenome

All Implemented Interfaces:
  Serializable, Genome, ArrayGenome, MLMethod

    public class IntegerArrayGenome

extends BasicGenome
implements ArrayGenome

A genome that is an array of discrete integer values.

See Also:
  Serialized Form

Constructor Summary
`IntegerArrayGenome(int size)` Construct the genome.
`IntegerArrayGenome(IntegerArrayGenome other)` Construct the genome by copying another.

Method Summary
`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.
`int[]` | `getData()`
`int` | `size()`
`void` | `swap(int iswap1, int iswap2)` Swap two elements in this genome.

Methods inherited from class org.encog.ml.ea.genome.BasicGenome
`getAdjustedScore, getBirthGeneration, getPopulation, getScore, getSpecies, setAdjustedScore, setBirthGeneration, setPopulation, setScore, setSpecies, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.encog.ml.ea.genome.Genome
`getAdjustedScore, getBirthGeneration, getPopulation, getScore, getSpecies, setAdjustedScore, setBirthGeneration, setPopulation, setScore, setSpecies`

Constructor Detail

### IntegerArrayGenome

    public IntegerArrayGenome(int size)

  Construct the genome.

  Parameters:
    `size` - The size of the genome.

### IntegerArrayGenome

    public IntegerArrayGenome(IntegerArrayGenome other)

  Construct the genome by copying another.

  Parameters:
    `other` - The other genome.

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 int[] getData()

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All Rights Reserved.