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). |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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).
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 generatedlowerBound
- lower bound for integersupperBound
- upper bound for integers
IntegerArrayInitialization
public IntegerArrayInitialization(int arraySize,
int lowerBound,
int upperBound,
int indNumber)
- Constructor.
- Parameters:
arraySize
- size of the array to be generatedlowerBound
- lower bound of the integersupperBound
- upper bound of the integersindNumber
- 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 generatedlowerBound
- lower bound of the integersupperBound
- upper bound of the integersindNumber
- number of individuals to be generatedsetSize
- number of chromosomes to be generated
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
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS