Package ec.select
Class FirstSelection
java.lang.Object
ec.BreedingSource
ec.SelectionMethod
ec.select.FirstSelection
- All Implemented Interfaces:
Prototype,Setup,SteadyStateBSourceForm,RandomChoiceChooserD,Serializable,Cloneable
Always picks the first individual in the subpopulation. This is mostly
for testing purposes.
Default Base
select.first
- See Also:
-
Field Summary
FieldsFields inherited from class ec.SelectionMethod
INDS_PRODUCED, KEY_PARENTSFields inherited from class ec.BreedingSource
NO_PROBABILITY, P_PROB, probability -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the default base for this prototype.voidindividualReplaced(SteadyStateEvolutionState state, int subpopulation, int thread, int individual) Called whenever an individual has been replaced by another in the population.intproduce(int min, int max, int start, int subpopulation, Individual[] inds, EvolutionState state, int thread, HashMap<String, Object> misc) intproduce(int subpopulation, EvolutionState state, int thread) An alternative form of "produce" special to Selection Methods; selects an individual from the given subpopulation and returns its position in that subpopulation.voidIssue an error (not a fatal -- we guarantee that callers of this method will also call exitIfErrors) if any of your sources, or their sources, etc., are not of SteadyStateBSourceForm.Methods inherited from class ec.SelectionMethod
finishProducing, prepareToProduce, produce, produces, produceWithoutCloning, typicalIndsProducedMethods inherited from class ec.BreedingSource
clone, fillStubs, getProbability, pickRandom, preparePipeline, setProbability, setup, setupProbabilities
-
Field Details
-
P_FIRST
default base- See Also:
-
-
Constructor Details
-
FirstSelection
public FirstSelection()
-
-
Method Details
-
defaultBase
Description copied from interface:PrototypeReturns the default base for this prototype. This should generally be implemented by building off of the static base() method on the DefaultsForm object for the prototype's package. This should be callable during setup(...).- Specified by:
defaultBasein interfacePrototype
-
produce
Description copied from class:SelectionMethodAn alternative form of "produce" special to Selection Methods; selects an individual from the given subpopulation and returns its position in that subpopulation.- Specified by:
producein classSelectionMethod
-
produce
public int produce(int min, int max, int start, int subpopulation, Individual[] inds, EvolutionState state, int thread, HashMap<String, Object> misc) -
individualReplaced
public void individualReplaced(SteadyStateEvolutionState state, int subpopulation, int thread, int individual) Description copied from interface:SteadyStateBSourceFormCalled whenever an individual has been replaced by another in the population.- Specified by:
individualReplacedin interfaceSteadyStateBSourceForm
-
sourcesAreProperForm
Description copied from interface:SteadyStateBSourceFormIssue an error (not a fatal -- we guarantee that callers of this method will also call exitIfErrors) if any of your sources, or their sources, etc., are not of SteadyStateBSourceForm.- Specified by:
sourcesAreProperFormin interfaceSteadyStateBSourceForm
-