GClasses
GClasses::GBouncyBalls Class Reference

#include <GParticleSwarm.h>

Inheritance diagram for GClasses::GBouncyBalls:
GClasses::GOptimizer

Public Member Functions

 GBouncyBalls (GTargetFunction *pCritic, size_t population, GRand &rand, double probTeleport=0.01)
 
virtual ~GBouncyBalls ()
 
virtual const GVeccurrentVector ()
 Returns the current vector of the optimizer. For greedy search methods, this will be the best vector yet found. More...
 
virtual double iterate ()
 Makes another attempt to find a better vector. Returns the heuristic error. (Usually you will call this method in a loop until your stopping criteria has been met.) More...
 
- Public Member Functions inherited from GClasses::GOptimizer
 GOptimizer (GTargetFunction *pCritic)
 
virtual ~GOptimizer ()
 
void basicTest (double minAccuracy, double warnRange=0.001)
 This is a helper method used by the unit tests of several model learners. More...
 
double searchUntil (size_t nBurnInIterations, size_t nIterations, double dImprovement)
 This will first call iterate() nBurnInIterations times, then it will repeatedly call iterate() in blocks of nIterations times. If the error heuristic has not improved by the specified ratio after a block of iterations, it will stop. (For example, if the error before the block of iterations was 50, and the error after is 49, then training will stop if dImprovement is > 0.02.) If the error heuristic is not stable, then the value of nIterations should be large. More...
 

Static Public Member Functions

static void test ()
 

Public Attributes

size_t m_ball
 
size_t m_bestIndex
 
GVec m_errors
 
GMatrix m_positions
 
double m_probSpurt
 
double m_probTeleport
 
GRandm_rand
 
GMatrix m_velocities
 

Additional Inherited Members

- Protected Attributes inherited from GClasses::GOptimizer
GTargetFunctionm_pCritic
 

Constructor & Destructor Documentation

GClasses::GBouncyBalls::GBouncyBalls ( GTargetFunction pCritic,
size_t  population,
GRand rand,
double  probTeleport = 0.01 
)
virtual GClasses::GBouncyBalls::~GBouncyBalls ( )
virtual

Member Function Documentation

virtual const GVec& GClasses::GBouncyBalls::currentVector ( )
inlinevirtual

Returns the current vector of the optimizer. For greedy search methods, this will be the best vector yet found.

Implements GClasses::GOptimizer.

virtual double GClasses::GBouncyBalls::iterate ( )
virtual

Makes another attempt to find a better vector. Returns the heuristic error. (Usually you will call this method in a loop until your stopping criteria has been met.)

Implements GClasses::GOptimizer.

static void GClasses::GBouncyBalls::test ( )
static

Member Data Documentation

size_t GClasses::GBouncyBalls::m_ball
size_t GClasses::GBouncyBalls::m_bestIndex
GVec GClasses::GBouncyBalls::m_errors
GMatrix GClasses::GBouncyBalls::m_positions
double GClasses::GBouncyBalls::m_probSpurt
double GClasses::GBouncyBalls::m_probTeleport
GRand& GClasses::GBouncyBalls::m_rand
GMatrix GClasses::GBouncyBalls::m_velocities