Operator
Class JoinOperator

java.lang.Object
  extended by Operator.OperatorModule
      extended by Operator.JoinOperator
All Implemented Interfaces:
Module, Operator, Stochastic
Direct Known Subclasses:
EliteReplacementOperator, MeritReplacementStrategy, SimpleReplacementStrategy

public abstract class JoinOperator
extends OperatorModule

Abstract class for joining two populations. The incomingPopulation is added to the population. Eg in ReplacementOperator


Field Summary
protected  Population incomingPopulation
           
 
Fields inherited from class Operator.OperatorModule
population, rng
 
Constructor Summary
JoinOperator()
          Create new instance
JoinOperator(RandomNumberGenerator rng, Population incPop)
          Constructor
 
Method Summary
 Population getIncomingPopulation()
          Get the population coming in
protected  void increaseAge(java.util.List<Individual> operands)
          Increase the age of the operands by 1
abstract  void perform()
          Performs the operation on the population
 void setIncomingPopulation(Population incomingPopulation)
          Set the incomming population
abstract  void setOperation(Operation op)
          Set operation that operator performs
 
Methods inherited from class Operator.OperatorModule
getRNG, setPopulation, setRNG
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Operator.Operator
getOperation
 

Field Detail

incomingPopulation

protected Population incomingPopulation
Constructor Detail

JoinOperator

public JoinOperator(RandomNumberGenerator rng,
                    Population incPop)
Constructor

Parameters:
rng - random number generator
incPop - incomming population

JoinOperator

public JoinOperator()
Create new instance

Method Detail

perform

public abstract void perform()
Description copied from interface: Module
Performs the operation on the population

Specified by:
perform in interface Module
Specified by:
perform in class OperatorModule

setOperation

public abstract void setOperation(Operation op)
Description copied from interface: Operator
Set operation that operator performs

Parameters:
op - operation

getIncomingPopulation

public Population getIncomingPopulation()
Get the population coming in

Returns:
incomming population

setIncomingPopulation

public void setIncomingPopulation(Population incomingPopulation)
Set the incomming population

Parameters:
incomingPopulation - incomming population

increaseAge

protected void increaseAge(java.util.List<Individual> operands)
Increase the age of the operands by 1

Parameters:
operands - operands for the operation