org.dishevelled.swarm
Class ParticleSwarmOptimizationAlgorithmEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.dishevelled.swarm.ParticleSwarmOptimizationAlgorithmEvent
All Implemented Interfaces:
Serializable

public final class ParticleSwarmOptimizationAlgorithmEvent
extends EventObject

An event representing progress in a particle swarm optimization algorithm function.

Version:
$Revision$ $Date$
Author:
Michael Heuer
See Also:
Serialized Form

Field Summary
static int DEFAULT_DIMENSION
          Default dimension.
static int DEFAULT_EPOCH
          Default epoch.
static double DEFAULT_FITNESS
          Default fitness score.
static int DEFAULT_PARTICLE
          Default particle.
static double DEFAULT_VALUE
          Default value.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ParticleSwarmOptimizationAlgorithmEvent(ParticleSwarmOptimizationAlgorithm source, int particle, int dimension, double value)
          Create a new particle swarm optimization algorithm event with the specified parameters.
ParticleSwarmOptimizationAlgorithmEvent(ParticleSwarmOptimizationAlgorithm source, int particle, int dimension, double value, double fitness)
          Create a new particle swarm optimization algorithm event with the specified parameters.
ParticleSwarmOptimizationAlgorithmEvent(ParticleSwarmOptimizationAlgorithm source, ParticleSwarm swarm, int epoch)
          Create a new particle swarm optimization algorithm event with the specified parameters.
 
Method Summary
 int getDimension()
          Return the dimension for this event, if any.
 int getEpoch()
          Return the epoch for this event, if any.
 double getFitness()
          Return the fitness score for this event, if any.
 int getParticle()
          Return the particle for this event, if any.
 ParticleSwarm getParticleSwarm()
          Return the particle swarm for this event, if any.
 ParticleSwarmOptimizationAlgorithm getParticleSwarmOptimizationAlgorithm()
          Return the source of this event as a particle swarm optimization algorithm.
 double getValue()
          Return the value for this event, if any.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_EPOCH

public static final int DEFAULT_EPOCH
Default epoch.

See Also:
Constant Field Values

DEFAULT_PARTICLE

public static final int DEFAULT_PARTICLE
Default particle.

See Also:
Constant Field Values

DEFAULT_DIMENSION

public static final int DEFAULT_DIMENSION
Default dimension.

See Also:
Constant Field Values

DEFAULT_VALUE

public static final double DEFAULT_VALUE
Default value.

See Also:
Constant Field Values

DEFAULT_FITNESS

public static final double DEFAULT_FITNESS
Default fitness score.

See Also:
Constant Field Values
Constructor Detail

ParticleSwarmOptimizationAlgorithmEvent

ParticleSwarmOptimizationAlgorithmEvent(ParticleSwarmOptimizationAlgorithm source,
                                        ParticleSwarm swarm,
                                        int epoch)
Create a new particle swarm optimization algorithm event with the specified parameters.

Parameters:
source - source of this event, must not be null
swarm - particle swarm, must not be null
epoch - epoch

ParticleSwarmOptimizationAlgorithmEvent

ParticleSwarmOptimizationAlgorithmEvent(ParticleSwarmOptimizationAlgorithm source,
                                        int particle,
                                        int dimension,
                                        double value)
Create a new particle swarm optimization algorithm event with the specified parameters.

Parameters:
source - source of this event, must not be null
particle - particle
dimension - dimension
value - value, may be position or velocity

ParticleSwarmOptimizationAlgorithmEvent

ParticleSwarmOptimizationAlgorithmEvent(ParticleSwarmOptimizationAlgorithm source,
                                        int particle,
                                        int dimension,
                                        double value,
                                        double fitness)
Create a new particle swarm optimization algorithm event with the specified parameters.

Parameters:
source - source of this event, must not be null
particle - particle
dimension - dimension
value - value, may be position or velocity
fitness - fitness score
Method Detail

getParticleSwarmOptimizationAlgorithm

public ParticleSwarmOptimizationAlgorithm getParticleSwarmOptimizationAlgorithm()
Return the source of this event as a particle swarm optimization algorithm.

Returns:
the source of this event as a particle swarm optimization algorithm

getParticleSwarm

public ParticleSwarm getParticleSwarm()
Return the particle swarm for this event, if any. The particle swarm may be null.

Returns:
the particle swarm for this event, if any

getEpoch

public int getEpoch()
Return the epoch for this event, if any. Defaults to -1.

Returns:
the epoch for this event, if any
See Also:
DEFAULT_EPOCH

getParticle

public int getParticle()
Return the particle for this event, if any. Defaults to -1.

Returns:
the particle for this event, if any
See Also:
DEFAULT_PARTICLE

getDimension

public int getDimension()
Return the dimension for this event, if any. Defaults to -1.

Returns:
the dimension for this event, if any
See Also:
DEFAULT_DIMENSION

getValue

public double getValue()
Return the value for this event, if any. The value may refer to position or velocity. Defaults to Double.NaN.

Returns:
the value for this event, if any
See Also:
DEFAULT_VALUE

getFitness

public double getFitness()
Return the fitness score for this event, if any. Defaults to Double.NaN.

Returns:
the fitness score for this event, if any
See Also:
DEFAULT_FITNESS


Copyright © 2006-2012 dishevelled.org. All Rights Reserved.