highprecisionpso::PotentialSqrtAbsVelocityPlusSqrtDistToGlobalAttractor Class Reference

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>

Inheritance diagram for highprecisionpso::PotentialSqrtAbsVelocityPlusSqrtDistToGlobalAttractor:

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
scaleThe scale.

Member Function Documentation

mpf_t* highprecisionpso::PotentialSqrtAbsVelocityPlusSqrtDistToGlobalAttractor::Evaluate ( Particle p,
int  dim 
)
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
pThe particle.
dimThe dimension index.
Returns
The statistical value.

Implements highprecisionpso::PotentialCalculator.

std::string highprecisionpso::PotentialSqrtAbsVelocityPlusSqrtDistToGlobalAttractor::GetName ( )
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: