jenes.tutorials.problem5
Class IntegerAlleleSet
java.lang.Object
jenes.chromosome.GenericAlleleSet<java.lang.Integer>
jenes.tutorials.problem5.IntegerAlleleSet
- All Implemented Interfaces:
- AlleleSet<java.lang.Integer>
public class IntegerAlleleSet
- extends GenericAlleleSet<java.lang.Integer>
Tutorial illustrating the use of object-oriented chromosomes, whose
allele set can be defined by the user for each gene.
In this example the chromosomes are combinations of colors. We aim at finding
the vector of colors closest to a given sequence.
This class defines a set of integers.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Luigi Troiano, Pierpaolo Lombardi
Method Summary |
static IntegerAlleleSet |
createRandom(int size,
int lowerBound,
int upperBound)
Builds an IntegerAlleleSet with random values within the range [lowerBound,upperBound]
|
static IntegerAlleleSet |
createUniform(int size,
int lowerBound,
int upperBound)
Builds a new IntegerAlleleSet with uniformly distributed values within the range [lowerBound,upperBound]
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntegerAlleleSet
public IntegerAlleleSet(java.util.Set<java.lang.Integer> set)
createRandom
public static IntegerAlleleSet createRandom(int size,
int lowerBound,
int upperBound)
- Builds an IntegerAlleleSet with random values within the range [lowerBound,upperBound]
- Parameters:
size
- the allala set cardinalitylowerBound
- the min value to chooseupperBound
- the max value to choose
- Returns:
- a new IntegerAlleleSet
createUniform
public static IntegerAlleleSet createUniform(int size,
int lowerBound,
int upperBound)
- Builds a new IntegerAlleleSet with uniformly distributed values within the range [lowerBound,upperBound]
- Parameters:
size
- the allala set cardinalitylowerBound
- the min value to chooseupperBound
- the max value to choose
- Returns:
- a new IntegerAlleleSet