This potential calculator can calculate the scaled square root of the absolute velocity plus the square root of the distance to the global attractor. More...
#include <potential_calculator.h>
Public Member Functions | |
PotentialSqrtAbsVelocityPlusSqrtDistToGlobalAttractor (double scale) | |
The constructor, which specifies the scale for the absolute velocity. More... | |
mpf_t * | Evaluate (Particle *p, int dim) |
Calculates the scaled square root of the absolute value of the velocity plus the square root of the distance to the global attractor. More... | |
std::string | GetName () |
Returns a string representation of this object. More... | |
Public Member Functions inherited from highprecisionpso::PotentialCalculator | |
std::vector< std::vector< mpf_t * > > | Evaluate () |
Calculates for all particles and dimensions the statistical values. More... | |
Public Member Functions inherited from highprecisionpso::SpecificStatisticalEvaluation | |
virtual | ~SpecificStatisticalEvaluation () |
Detailed Description
This potential calculator can calculate the scaled square root of the absolute velocity plus the square root of the distance to the global attractor.
Constructor & Destructor Documentation
highprecisionpso::PotentialSqrtAbsVelocityPlusSqrtDistToGlobalAttractor::PotentialSqrtAbsVelocityPlusSqrtDistToGlobalAttractor | ( | double | scale | ) |
The constructor, which specifies the scale for the absolute velocity.
- Parameters
-
scale The scale.
Member Function Documentation
|
virtual |
Calculates the scaled square root of the absolute value of the velocity plus the square root of the distance to the global attractor.
Let x be the position of the particle,
let v be the velocity of the particle,
let g be the global attractor of the particle
and let s be the scale of this PotentialCalculator.
Then the result of this potential calculation is (s · sqrt( abs( v[dim] ) ) + sqrt( abs( x[dim] - g[dim] ) ).
- Parameters
-
p The particle. dim The dimension index.
- Returns
- The statistical value.
Implements highprecisionpso::PotentialCalculator.
|
virtual |
Returns a string representation of this object.
- Returns
- The name of the object.
Implements highprecisionpso::SpecificStatisticalEvaluation.
The documentation for this class was generated from the following file:
- src/statistics/potential_calculator.h