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 Chromosome

    java.lang.Object
      org.encog.ml.genetic.genome.Chromosome

All Implemented Interfaces:
  Serializable

    public class Chromosome

extends Object
implements Serializable

Implements a chromosome to genetic algorithm. This is an abstract class. Other classes are provided in this book that use this base class to train neural networks or provide an answer to the traveling salesman problem. Chromosomes are made up of genes. Genomes in this genetic algorithm consist of one or more chromosomes.

See Also:
  Serialized Form

Constructor Summary
`Chromosome()`

Method Summary
`void` | `add(Gene gene)` Add a gene.
`Gene` | `get(int i)` Get an individual gene.
`Gene` | `getGene(int gene)` Get the specified gene.
`List<Gene>` | `getGenes()` Used the get the entire gene list.
`int` | `size()`

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

Constructor Detail

### Chromosome

    public Chromosome()

Method Detail

### add

    public final void add(Gene gene)

  Add a gene.

  Parameters:
    `gene` - The gene to add.

### get

    public final Gene get(int i)

  Get an individual gene.

  Parameters:
    `i` - The index of the gene.
  Returns:
    The gene.

### getGene

    public final Gene getGene(int gene)

  Get the specified gene.

  Parameters:
    `gene` - The specified gene.
  Returns:
    The gene specified.

### getGenes

    public final List<Gene> getGenes()

  Used the get the entire gene list.

  Returns:
    the genes

### size

    public final int size()

  Returns:
    The number of genes in this chromosome.

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 © 2011. All Rights Reserved.