mss.ea.ini
Class RandomStringInitialization
java.lang.Object
|
+--mss.ea.core.GeneticOperator
|
+--mss.ea.ini.Initialization
|
+--mss.ea.ini.RandomStringInitialization
- All Implemented Interfaces:
- IndividualSource
- Direct Known Subclasses:
- RandomWordInitialization
- public class RandomStringInitialization
- extends Initialization
Operator that creates random string chromosomes.
The purpose of this class is mainly the support of debugging.
- Since:
- 0.2.1
- Version:
- $Revision: 1.2 $ $Date: 2001/11/20 12:28:33 $
- Author:
- Andreas Rummler
Field Summary |
protected int |
length
Length of the generated strings. |
Method Summary |
ChromosomeSet |
createSet()
Creates a chromosome set containing chromosomes of type string. |
protected java.lang.String |
createString()
Creates a random string according to the conditions given in the constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
length
protected int length
- Length of the generated strings.
RandomStringInitialization
public RandomStringInitialization(int stringLength)
- Constructor.
- Parameters:
stringLength
- length of the strings to be generated
RandomStringInitialization
public RandomStringInitialization(int stringLength,
int indNumber)
- Constructor with number of individuals.
- Parameters:
stringLength
- length of the strings to be generatedindNumber
- number of indiviuduals to be generated
RandomStringInitialization
public RandomStringInitialization(int stringLength,
int indNumber,
int setSize)
- Constructor with number of individuals and chromosomes.
- Parameters:
stringLength
- length of the strings to be generatedindNumber
- number of indiviuduals to be generatedsetSize
- number of chromosomes to be generated
createSet
public ChromosomeSet createSet()
- Creates a chromosome set containing chromosomes of type string.
- Overrides:
createSet
in class Initialization
- Returns:
- generated chromosome set
createString
protected java.lang.String createString()
- Creates a random string according to the conditions given in the constructor.
- Returns:
- generated string
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS