jenes.tutorials.problem5
Class IntegerAlleleSet

java.lang.Object
  extended by jenes.chromosome.GenericAlleleSet<java.lang.Integer>
      extended by 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

Constructor Summary
IntegerAlleleSet(java.util.Set<java.lang.Integer> set)
           
 
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 jenes.chromosome.GenericAlleleSet
getElementAt, getRandomValue, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerAlleleSet

public IntegerAlleleSet(java.util.Set<java.lang.Integer> set)
Method Detail

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 cardinality
lowerBound - the min value to choose
upperBound - 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 cardinality
lowerBound - the min value to choose
upperBound - the max value to choose
Returns:
a new IntegerAlleleSet