This class implements the bound handling strategy random forth for the particle swarm optimization. More...
#include <random_forth.h>
Public Member Functions | |
BoundHandlingRandomForth (RandomForthMarkDimensions random_forth_mark_dimensions) | |
The constructor. More... | |
std::string | GetName () |
Returns a string representation of this object. More... | |
void | SetParticleUpdate (Particle *p) |
Updates the position of the particle p according to the current position and the new (already calculated) velocity. More... | |
Public Member Functions inherited from highprecisionpso::BoundHandling | |
virtual | ~BoundHandling () |
The destructor. More... | |
virtual std::vector< mpf_t * > | GetDirectionVector (const std::vector< mpf_t * > &position, const std::vector< mpf_t * > &aim) |
Calculates the difference vector between the position and the aim. More... | |
Detailed Description
This class implements the bound handling strategy random forth for the particle swarm optimization.
If a particle would leave the search space, the actual new position is sampled uniformly at random on the part of the segment between the old position and the new position, which is inside the search space bounds.
Constructor & Destructor Documentation
highprecisionpso::BoundHandlingRandomForth::BoundHandlingRandomForth | ( | RandomForthMarkDimensions | random_forth_mark_dimensions | ) |
The constructor.
- Parameters
-
random_forth_mark_dimensions Specifies on which dimensions the velocity adjustment is applied.
Member Function Documentation
|
virtual |
Returns a string representation of this object.
- Returns
- The name of the object.
Implements highprecisionpso::BoundHandling.
|
virtual |
Updates the position of the particle p according to the current position and the new (already calculated) velocity.
The new position is calculated by adding the velocity to the position. If the new position would be outside of the search space bounds then the bound handling strategy random forth is activated. Afterwards the specified velocity adjustment is activated with suitable parameters.
- Parameters
-
p The particle, which should be updated.
Implements highprecisionpso::BoundHandling.
The documentation for this class was generated from the following file:
- src/bound_handling/random_forth.h