org.vizzini.ai.geneticalgorithm
Class AbstractSelector
java.lang.Object
org.vizzini.ai.geneticalgorithm.AbstractSelector
- All Implemented Interfaces:
- ISelector
- Direct Known Subclasses:
- FitnessProportionalSelector, RandomSelector
public abstract class AbstractSelector
- extends Object
- implements ISelector
Provides base functionality for a selector in a genetic algorithm.
- Since:
- v0.3
- Version:
- v0.3
- Author:
- Jeffrey M. Thompson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSelector
public AbstractSelector()
getLastIndex
public int getLastIndex()
- Return the last index selected, or -1 if none.
- Specified by:
getLastIndex
in interface ISelector
- Since:
- v0.3
init
public void init(IPopulation population)
- Initialize this selector from the given population.
- Specified by:
init
in interface ISelector
- Since:
- v0.3
checkState
protected void checkState()
- Check the state of this object for validity.
- Since:
- v0.3
getPopulation
protected IPopulation getPopulation()
- Returns:
- Return population.
- Since:
- v0.3
setLastIndex
protected void setLastIndex(int lastIndex)
- Parameters:
lastIndex
- the lastIndex to set
setPopulation
protected void setPopulation(IPopulation population)
- Parameters:
population
- the population to set- Since:
- v0.3
Copyright © 2007 Vizzini.org. All Rights Reserved.
|
2007.12.25.03.00.02 |