net.sourceforge.cilib.algorithm.population.knowledgetransferstrategies
Class SelectiveKnowledgeTransferStrategy

java.lang.Object
  extended by net.sourceforge.cilib.algorithm.population.knowledgetransferstrategies.SelectiveKnowledgeTransferStrategy
All Implemented Interfaces:
Serializable, KnowledgeTransferStrategy, Cloneable

public class SelectiveKnowledgeTransferStrategy
extends Object
implements KnowledgeTransferStrategy

An implementation of KnowledgeTransferStrategy where two Selection instances are used to first select a sub-population (PopulationBasedAlgorithm) from a collection of population-based algorithms (see MultiPopulationBasedAlgorithm) and then within this sub-population's {@link Topology}, which entity's knowledge is to be transfered to the caller requesting it.

Author:
Wiehann Matthysen
See Also:
Serialized Form

Constructor Summary
SelectiveKnowledgeTransferStrategy()
           
SelectiveKnowledgeTransferStrategy(SelectiveKnowledgeTransferStrategy copy)
           
 
Method Summary
 SelectiveKnowledgeTransferStrategy getClone()
          Create a cloned copy of the current object and return it.
 SelectionRecipe<Entity> getEntitySelection()
           
 SelectionRecipe<PopulationBasedAlgorithm> getPopulationSelection()
           
 void setEntitySelection(SelectionRecipe<Entity> entitySelection)
           
 void setPopulationSelection(SelectionRecipe<PopulationBasedAlgorithm> populationSelection)
           
 Type transferKnowledge(List<PopulationBasedAlgorithm> allPopulations)
          Returns knowledge that was gained from an entity within the list of populations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectiveKnowledgeTransferStrategy

public SelectiveKnowledgeTransferStrategy()

SelectiveKnowledgeTransferStrategy

public SelectiveKnowledgeTransferStrategy(SelectiveKnowledgeTransferStrategy copy)
Method Detail

getClone

public SelectiveKnowledgeTransferStrategy getClone()
Description copied from interface: Cloneable
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface KnowledgeTransferStrategy
Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

setPopulationSelection

public void setPopulationSelection(SelectionRecipe<PopulationBasedAlgorithm> populationSelection)

getPopulationSelection

public SelectionRecipe<PopulationBasedAlgorithm> getPopulationSelection()

setEntitySelection

public void setEntitySelection(SelectionRecipe<Entity> entitySelection)

getEntitySelection

public SelectionRecipe<Entity> getEntitySelection()

transferKnowledge

public Type transferKnowledge(List<PopulationBasedAlgorithm> allPopulations)
Description copied from interface: KnowledgeTransferStrategy
Returns knowledge that was gained from an entity within the list of populations.

Specified by:
transferKnowledge in interface KnowledgeTransferStrategy
Parameters:
allPopulations - The list of populations that will be used to select an entity who's knowledge will be used.
Returns:
The knowledge that was gained.


Copyright © 2009 CIRG. All Rights Reserved.