org.apache.commons.math.genetics
Interface PermutationChromosome<T>
- Type Parameters:
T
- type of the permuted objects
- All Known Implementing Classes:
- RandomKey
public interface PermutationChromosome<T>
Interface indicating that the chromosome represents a permutation of objects.
- Since:
- 2.0
- Version:
- $Revision: 799857 $ $Date: 2009-08-01 09:07:12 -0400 (Sat, 01 Aug 2009) $
Method Summary |
java.util.List<T> |
decode(java.util.List<T> sequence)
Permutes the sequence of objects of type T according to the
permutation this chromosome represents. |
decode
java.util.List<T> decode(java.util.List<T> sequence)
- Permutes the
sequence
of objects of type T according to the
permutation this chromosome represents. For example, if this chromosome
represents a permutation (3,0,1,2), and the unpermuted sequence is
(a,b,c,d), this yields (d,a,b,c).
- Parameters:
sequence
- the unpermuted (original) sequence of objects
- Returns:
- permutation of
sequence
represented by this
permutation
Copyright (c) 2003-2009 Apache Software Foundation