jenes.chromosome
Interface AlleleSet<T>

Type Parameters:
T - class of elements held by AlleleSet
All Known Implementing Classes:
DoubleAlleleSet, GenericAlleleSet, IntegerAlleleSet

public interface AlleleSet<T>

An AlleleSet represents an alphabet of object gene allele values. Each ObjectChromosome.Gene of an ObjectChromosome has an allele set containing all the object values it can assume. A custom set of values can be determined by implementing this interface.

Since:
1.0
Version:
1.2
Author:
Luigi Troiano, Pierpaolo Lombardi, Giuseppe Pascale, Thierry Bodhuin
See Also:
ObjectChromosome

Method Summary
 T getElementAt(int pos)
          Gets the allele value at the specified position
 T getRandomValue()
          Gets a random allele value within this alphabet.
 int size()
          Returns the alphabet size
 

Method Detail

getElementAt

T getElementAt(int pos)
Gets the allele value at the specified position

Parameters:
pos - the index of the desidered allele value
Returns:
the allele value at the specified position

getRandomValue

T getRandomValue()
Gets a random allele value within this alphabet. The allele value returned has to be a copy of the value in the allele set.

Returns:
the random value selected

size

int size()
Returns the alphabet size

Returns:
the alphabet size