The orientation change updater implements an update procedure, which changes orientation if some directions have little relative movement. More...
#include <orientation_change_updater.h>
Public Member Functions | |
OrientationChangeUpdater (double log2_limit) | |
The constructor. More... | |
std::string | GetName () |
Returns a string representation of this object. More... | |
void | LoadData (std::ifstream *input_stream, ProgramVersion *version_of_stored_data) |
Loads data to reset the state of the position and velocity updater to the state which was stored. More... | |
void | StoreData (std::ofstream *output_stream) |
Stores the current state of this position and velocity updater such that it can completely restore the current state with this data. More... | |
void | Update (Particle *p) |
Processes a single movement of the specified particle. More... | |
Public Member Functions inherited from highprecisionpso::PositionAndVelocityUpdater | |
virtual | ~PositionAndVelocityUpdater () |
Detailed Description
The orientation change updater implements an update procedure, which changes orientation if some directions have little relative movement.
See update function for detailed information about the update process.
Constructor & Destructor Documentation
highprecisionpso::OrientationChangeUpdater::OrientationChangeUpdater | ( | double | log2_limit | ) |
The constructor.
- Parameters
-
log2_limit The allowed logarithmic range for the scale of movement in different directions.
Member Function Documentation
|
virtual |
Returns a string representation of this object.
- Returns
- The name of the object.
Implements highprecisionpso::PositionAndVelocityUpdater.
|
virtual |
Loads data to reset the state of the position and velocity updater to the state which was stored.
- Parameters
-
input_stream The stream which contains the data about the state of the position and velocity updater. version_of_stored_data The version of the program when the backup was created.
Reimplemented from highprecisionpso::PositionAndVelocityUpdater.
|
virtual |
Stores the current state of this position and velocity updater such that it can completely restore the current state with this data.
- Parameters
-
output_stream The output stream where the state should be stored.
Reimplemented from highprecisionpso::PositionAndVelocityUpdater.
|
virtual |
Processes a single movement of the specified particle.
Random values of the standard movement equations are calculated in an orthogonal transformed space. In the orthogonal transformed space the scale of movement in each dimension is calculated. First we sum up the absolute value of the velocity, the distance to the local attractor and the distance to the global attractor. The scale of movement is then the logarithm of this sum. If in the current orientation the minimal and maximal value of the scale of movement differ more than log2limit then the lowest and largest directions are rotated with a hadamard transformation. Beside that change the default behavior is used.
- Parameters
-
p The particle, which should be updated.
Implements highprecisionpso::PositionAndVelocityUpdater.
The documentation for this class was generated from the following file:
- src/position_and_velocity_updater/orientation_change_updater.h