Package pulse.search.direction.pso
Class SwarmState
- java.lang.Object
-
- pulse.search.direction.IterativeState
-
- pulse.search.direction.pso.SwarmState
-
- All Implemented Interfaces:
Serializable
public class SwarmState extends IterativeState
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SwarmState()SwarmState(int numberOfParticles, NeighbourhoodTopology neighborhoodTopology)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbestSoFar()Returns the best state achieved by any particle so far.voidcreate()voidevaluate(GeneralTask t)ParticleStategetBestSoFar()intgetBestSoFarIndex()NeighbourhoodTopologygetNeighborhoodTopology()Particle[]getParticles()Returns the particles of the swarm.voidprepare(GeneralTask t)voidsetBestSoFar(ParticleState bestSoFar)voidsetBestSoFarIndex(int bestSoFarIndex)voidsetNeighborhoodTopology(NeighbourhoodTopology neighborhoodTopology)voidsetParticles(Particle[] particles)-
Methods inherited from class pulse.search.direction.IterativeState
getCost, getFailedAttempts, getIteration, getParameters, incrementFailedAttempts, incrementStep, reset, resetFailedAttempts, setCost, setParameters
-
-
-
-
Constructor Detail
-
SwarmState
public SwarmState()
-
SwarmState
public SwarmState(int numberOfParticles, NeighbourhoodTopology neighborhoodTopology)
-
-
Method Detail
-
evaluate
public void evaluate(GeneralTask t) throws SolverException
- Throws:
SolverException
-
prepare
public void prepare(GeneralTask t)
-
create
public void create()
-
bestSoFar
public void bestSoFar()
Returns the best state achieved by any particle so far.
-
getNeighborhoodTopology
public NeighbourhoodTopology getNeighborhoodTopology()
-
setNeighborhoodTopology
public void setNeighborhoodTopology(NeighbourhoodTopology neighborhoodTopology)
-
getParticles
public Particle[] getParticles()
Returns the particles of the swarm.- Returns:
- array of Particles.
-
setParticles
public void setParticles(Particle[] particles)
-
getBestSoFar
public ParticleState getBestSoFar()
-
setBestSoFar
public void setBestSoFar(ParticleState bestSoFar)
-
getBestSoFarIndex
public int getBestSoFarIndex()
-
setBestSoFarIndex
public void setBestSoFarIndex(int bestSoFarIndex)
-
-