Inertia weight functor, which decreases exponentially over time.
More...
#include <ParticleSwarm.hh>
template<typename Scalar>
class Optimist::Optimizer::ExponentialDecrease2< Scalar >
- Template Parameters
-
| Scalar | Floating-point number type. The inertia weight is calculated by the following formula:
\[ w = w_{\min} + (w_{\max} - w_{\min}) *
\exp\left(-\left(\frac{t}{\frac{t_{\max}}{4}}\right)^2
\right) \text{.}
\]
|
◆ ExponentialDecrease2() [1/2]
template<typename Scalar>
Class constructor with minimum and maximum weights equal to 0.4 and 0.9, respectively.
◆ ExponentialDecrease2() [2/2]
template<typename Scalar>
Class constructor that accepts the minimum and maximum weight of the exponential decrease.
- Parameters
-
| [in] | min_weight | Lower bound of the inertia weight |
| [in] | max_weight | Upper bound of the inertia weight |
◆ operator()()
template<typename Scalar>
Get the inertia weight.
- Parameters
-
| [in] | iteration | Current iteration. |
| [in] | max_iterations | Maximum number of iterations. |
- Returns
- The inertia weight.
◆ m_max_weight
template<typename Scalar>
◆ m_min_weight
template<typename Scalar>
The documentation for this class was generated from the following file: