Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
MCSP.Algorithms.PSO
Contents
Synopsis
- type Weight = Default
- type Updater a = UpdaterContext a => Random (Vector Weight)
- randomVelocity :: UpdaterContext a => Random (Vector Weight)
- globalGuideDirection :: UpdaterContext a => Vector Weight
- localGuideDirection :: UpdaterContext a => Vector Weight
- previousVelocity :: UpdaterContext a => Vector Weight
- data PSOGuide a = PsoGuide {
- guideWeights :: Vector Weight
- guideGrade :: Grade
- sortedValues :: Vector a
- data Particle a = Particle {}
- data Swarm a = Swarm {}
- particleSwarmOptimization :: PSOContext a => Updater a -> Random (Vector Weight) -> Int -> Random (NonEmpty (Swarm a))
Updaters
type Updater a = UpdaterContext a => Random (Vector Weight) Source #
Evaluate the new velocity of a particle using the global best and iteration number.
randomVelocity :: UpdaterContext a => Random (Vector Weight) Source #
Produce random velocity with components up to given limit.
globalGuideDirection :: UpdaterContext a => Vector Weight Source #
Produce random velocity in the direction of the current global best, covering a random portion of the distance between them up to the given limit.
localGuideDirection :: UpdaterContext a => Vector Weight Source #
Produce random velocity in the direction of the current local best, covering a random portion of the distance between them up to the given limit.
previousVelocity :: UpdaterContext a => Vector Weight Source #
Just repeats the previous particle velocity.
Data structures
Information about a specific position (weights) and the value of the objective function at that point.
Constructors
PsoGuide | |
Fields
|
Instances
Show (PSOGuide a) Source # | |
Eq (PSOGuide a) Source # | |
Ord (PSOGuide a) Source # | |
Defined in MCSP.Algorithms.PSO |
A single particle of a swarm.
Constructors
Particle | |
A swarm for the PSO algorithm.
Constructors
Swarm | |