Package genetic
Class GeneticAlgorithm
java.lang.Object
genetic.GeneticAlgorithm
state machine
-
Field Details
-
factoryHashMap
-
-
Constructor Details
-
GeneticAlgorithm
- Parameters:
factoryKey
- the key for factory selection, eg: "knapsack" calls KSFactory
-
-
Method Details
-
getIdleState
- Returns:
- an instance of IdleState
-
getCompleteState
- Returns:
- an instance of CompleteState
-
getState
- Returns:
- current state of the class
-
getFactoryKey
-
setState
- Parameters:
state
- the new state for updating
-
nextStep
public void nextStep()call nextStep() method of current state
-