eaLib API Docs
Last Modified : January 7 2002

mss.ea.ini
Class IntegerArrayInitialization

java.lang.Object
  |
  +--mss.ea.core.GeneticOperator
        |
        +--mss.ea.ini.Initialization
              |
              +--mss.ea.ini.IntegerArrayInitialization
All Implemented Interfaces:
IndividualSource

public class IntegerArrayInitialization
extends Initialization

Creation of integer arrays. This class creates an individual containing an array of integers. The array size and the range of values can be specified.

Since:
0.1
Version:
$Revision: 1.3 $ $Date: 2001/11/19 13:45:30 $
Author:
Andreas Rummler

Field Summary
protected  int arraySize
          Size of the array to generated.
protected  int lowerBound
          Lower bound for the random integers (inclusive).
protected  int upperBound
          Upper bound for the random integers (exclusive).
 
Fields inherited from class mss.ea.ini.Initialization
number, setSize
 
Fields inherited from class mss.ea.core.GeneticOperator
description, ID, name
 
Constructor Summary
IntegerArrayInitialization(int arraySize, int lowerBound, int upperBound)
          Constructor.
IntegerArrayInitialization(int arraySize, int lowerBound, int upperBound, int indNumber)
          Constructor.
IntegerArrayInitialization(int arraySize, int lowerBound, int upperBound, int indNumber, int setSize)
          Constructor.
 
Method Summary
 int[] createArray()
          Creates an array according to the conditions given in the constructor.
 ChromosomeSet createSet()
          Creates a chromosome set containing a single ArrayChromosome.
 
Methods inherited from class mss.ea.ini.Initialization
getChromosomeSize, getIndividualNumber, getStream, next, setChromosomeSize, setIndividualNumber
 
Methods inherited from class mss.ea.core.GeneticOperator
getDescription, getID, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

arraySize

protected int arraySize
Size of the array to generated.

lowerBound

protected int lowerBound
Lower bound for the random integers (inclusive).

upperBound

protected int upperBound
Upper bound for the random integers (exclusive).
Constructor Detail

IntegerArrayInitialization

public IntegerArrayInitialization(int arraySize,
                                  int lowerBound,
                                  int upperBound)
Constructor. The number of individuals to generated is set to 1.
Parameters:
arraySize - size of the array to be generated
lowerBound - lower bound for integers
upperBound - upper bound for integers

IntegerArrayInitialization

public IntegerArrayInitialization(int arraySize,
                                  int lowerBound,
                                  int upperBound,
                                  int indNumber)
Constructor.
Parameters:
arraySize - size of the array to be generated
lowerBound - lower bound of the integers
upperBound - upper bound of the integers
indNumber - number of individuals to be generated

IntegerArrayInitialization

public IntegerArrayInitialization(int arraySize,
                                  int lowerBound,
                                  int upperBound,
                                  int indNumber,
                                  int setSize)
Constructor.
Parameters:
arraySize - size of the array to be generated
lowerBound - lower bound of the integers
upperBound - upper bound of the integers
indNumber - number of individuals to be generated
setSize - number of chromosomes to be generated
Method Detail

createSet

public ChromosomeSet createSet()
Creates a chromosome set containing a single ArrayChromosome.
Overrides:
createSet in class Initialization
Returns:
generated chromosome set

createArray

public int[] createArray()
Creates an array according to the conditions given in the constructor.
Returns:
generated array of integers

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS