Class convergence_measure
Defined in File convergence_measure.hpp
Inheritance Relationships
Base Type
public rmath::expression< double >
Derived Types
public cosm::convergence::angular_order
(Class angular_order)public cosm::convergence::interactivity
(Class interactivity)public cosm::convergence::positional_entropy
(Class positional_entropy)public cosm::convergence::task_dist_entropy
(Class task_dist_entropy)public cosm::convergence::velocity
(Class velocity)
Class Documentation
-
class convergence_measure : public rmath::expression<double>
Base class for all convergence measurements that can be computed on swarms. Provides common functionality needed by all derived classes (cannot be used to do anything useful on its own).
Subclassed by cosm::convergence::angular_order, cosm::convergence::interactivity, cosm::convergence::positional_entropy, cosm::convergence::task_dist_entropy, cosm::convergence::velocity
Public Functions
-
inline explicit convergence_measure(double epsilon)
-
inline bool converged(void) const
Return
TRUE
iff the measure is currently converged (i.e. has been above the threshold for at least the specified length).
-
inline double raw(void) const
Return the raw value of the convergence measure.
-
inline double raw_max(void) const
-
inline double raw_min(void) const
-
inline void reset(void)
-
inline void set_norm(double value)
Set the normalized value of the measure, computed at a given time. Any normalization calculation should be performed prior to calling this function (i.e. this function does not perform normalization itself, so you should not pass raw()).
-
inline bool update_convergence_state(void)
Update the state of the convergence measure. Prior to calling this function in a derived class, the raw/normalized values need to have been calculated and the min/max updated.
- Returns:
TRUE
iff convergence has been achieved according to configured parameters and the current state of the swarm.
-
inline void update_raw(double value)
Set the raw value of the measure, computed at a given time.
Also updates the min/max raw values that have been seen so far/since the last reset.
-
inline explicit convergence_measure(double epsilon)