net.sourceforge.cilib.pso.particle.initialisation
Class DataSetBasedPositionInitialisationStrategy
java.lang.Object
net.sourceforge.cilib.pso.particle.initialisation.DataSetBasedPositionInitialisationStrategy
- All Implemented Interfaces:
- Serializable, PositionInitialisationStrategy, Cloneable
public class DataSetBasedPositionInitialisationStrategy
- extends Object
- implements PositionInitialisationStrategy
This strategy initializes the position as well as the best position of a Particle
using the DataSetBasedCentroidsInitialisationStrategy
. The particle is therefore
initialized from the current dataset. The dataset
is found
using the ClusteringUtils.getClusterableDataSet()
method. The
ClusteringProblem
is also found using the
ClusteringUtils.getClusteringProblem()
method.
- Author:
- Theuns Cloete
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSetBasedPositionInitialisationStrategy
public DataSetBasedPositionInitialisationStrategy()
getClone
public DataSetBasedPositionInitialisationStrategy 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 PositionInitialisationStrategy
- Specified by:
getClone
in interface Cloneable
- Returns:
- An exact clone of the current object instance.
- See Also:
Object.clone()
initialise
public void initialise(Particle particle,
OptimisationProblem problem)
- Initialize the position and best position of the given
Particle
from the
current dataset using the DataSetBasedCentroidsInitialisationStrategy
.
- Specified by:
initialise
in interface PositionInitialisationStrategy
- Parameters:
particle
- the Particle
that should be initializedproblem
- the OptimisationProblem
that is currently being optimized. This
should be a ClusteringProblem
, but is ignored, because the clustering
problem is found via the ClusteringUtils.getClusteringProblem()
method.
Copyright © 2009 CIRG. All Rights Reserved.