Package genetic

Class GeneticAlgorithm

java.lang.Object
genetic.GeneticAlgorithm

public class GeneticAlgorithm extends Object
state machine
  • Field Details

  • Constructor Details

    • GeneticAlgorithm

      public GeneticAlgorithm(String factoryKey)
      Parameters:
      factoryKey - the key for factory selection, eg: "knapsack" calls KSFactory
  • Method Details

    • getIdleState

      public State getIdleState()
      Returns:
      an instance of IdleState
    • getCompleteState

      public State getCompleteState()
      Returns:
      an instance of CompleteState
    • getState

      public State getState()
      Returns:
      current state of the class
    • getFactoryKey

      public String getFactoryKey()
    • setState

      public void setState(State state)
      Parameters:
      state - the new state for updating
    • nextStep

      public void nextStep()
      call nextStep() method of current state