highprecisionpso::PositionAndVelocityUpdater Class Referenceabstract

This class is an abstract class for processing the velocity and position update of each particle. More...

#include <position_and_velocity_updater.h>

Inheritance diagram for highprecisionpso::PositionAndVelocityUpdater:

Public Member Functions

virtual ~PositionAndVelocityUpdater ()
 
virtual std::string GetName ()=0
 Returns a string representation of this object. More...
 
virtual 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...
 
virtual 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...
 
virtual void Update (Particle *p)=0
 This method initializes the velocity and position update of the specified particle. More...
 

Detailed Description

This class is an abstract class for processing the velocity and position update of each particle.

Constructor & Destructor Documentation

virtual highprecisionpso::PositionAndVelocityUpdater::~PositionAndVelocityUpdater ( )
inlinevirtual

The destructor.

Member Function Documentation

virtual std::string highprecisionpso::PositionAndVelocityUpdater::GetName ( )
pure virtual
virtual void highprecisionpso::PositionAndVelocityUpdater::LoadData ( std::ifstream *  input_stream,
ProgramVersion version_of_stored_data 
)
virtual

Loads data to reset the state of the position and velocity updater to the state which was stored.

Parameters
input_streamThe stream which contains the data about the state of the position and velocity updater.
version_of_stored_dataThe version of the program when the backup was created.

Reimplemented in highprecisionpso::DeltaUpdater, and highprecisionpso::OrientationChangeUpdater.

virtual void highprecisionpso::PositionAndVelocityUpdater::StoreData ( std::ofstream *  output_stream)
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_streamThe output stream where the state should be stored.

Reimplemented in highprecisionpso::DeltaUpdater, and highprecisionpso::OrientationChangeUpdater.

virtual void highprecisionpso::PositionAndVelocityUpdater::Update ( Particle p)
pure virtual

This method initializes the velocity and position update of the specified particle.

The new velocity is directly calculated in this method. After the new velocity is calculated the bound handling strategy determines the new position.

Warning
Do not forget to call the method of the bound handling specified in configuration section for setting the new position.
Parameters
pThe particle, which should be updated.

Implemented in highprecisionpso::DimensionIndependentUpdater, highprecisionpso::DeltaUpdater, highprecisionpso::OrientationChangeUpdater, highprecisionpso::TestingUpdater, and highprecisionpso::DefaultUpdater.


The documentation for this class was generated from the following file: