GClasses
|
An optimization algorithm inspired by flocking birds. More...
#include <GParticleSwarm.h>
Public Member Functions | |
GParticleSwarm (GTargetFunction *pCritic, size_t nPopulation, double dMin, double dRange, GRand *pRand) | |
virtual | ~GParticleSwarm () |
virtual double | iterate () |
Perform a little more optimization. | |
void | setLearningRate (double d) |
Specify the learning rate. | |
Protected Member Functions | |
void | reset () |
Protected Attributes | |
double | m_dMin |
double | m_dRange |
double | m_dLearningRate |
size_t | m_nDimensions |
size_t | m_nPopulation |
double * | m_pPositions |
double * | m_pVelocities |
double * | m_pBests |
double * | m_pErrors |
size_t | m_nGlobalBest |
GRand * | m_pRand |
An optimization algorithm inspired by flocking birds.
GClasses::GParticleSwarm::GParticleSwarm | ( | GTargetFunction * | pCritic, |
size_t | nPopulation, | ||
double | dMin, | ||
double | dRange, | ||
GRand * | pRand | ||
) |
virtual GClasses::GParticleSwarm::~GParticleSwarm | ( | ) | [virtual] |
virtual double GClasses::GParticleSwarm::iterate | ( | ) | [virtual] |
Perform a little more optimization.
Implements GClasses::GOptimizer.
void GClasses::GParticleSwarm::reset | ( | ) | [protected] |
void GClasses::GParticleSwarm::setLearningRate | ( | double | d | ) | [inline] |
Specify the learning rate.
double GClasses::GParticleSwarm::m_dLearningRate [protected] |
double GClasses::GParticleSwarm::m_dMin [protected] |
double GClasses::GParticleSwarm::m_dRange [protected] |
size_t GClasses::GParticleSwarm::m_nDimensions [protected] |
size_t GClasses::GParticleSwarm::m_nGlobalBest [protected] |
size_t GClasses::GParticleSwarm::m_nPopulation [protected] |
double* GClasses::GParticleSwarm::m_pBests [protected] |
double* GClasses::GParticleSwarm::m_pErrors [protected] |
double* GClasses::GParticleSwarm::m_pPositions [protected] |
GRand* GClasses::GParticleSwarm::m_pRand [protected] |
double* GClasses::GParticleSwarm::m_pVelocities [protected] |