QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
DecreasingInertia Class Reference

Decreasing Inertia. More...

#include <particleswarmoptimization.hpp>

+ Inheritance diagram for DecreasingInertia:
+ Collaboration diagram for DecreasingInertia:

Public Member Functions

 DecreasingInertia (Real threshold=0.5)
 
void setSize (Size M, Size N, Real c0, const EndCriteria &endCriteria) override
 initialize state for current problem More...
 
void setValues () override
 produce changes to PSO state for current iteration More...
 
- Public Member Functions inherited from ParticleSwarmOptimization::Inertia
virtual ~Inertia ()=default
 
virtual void setSize (Size M, Size N, Real c0, const EndCriteria &endCriteria)=0
 initialize state for current problem More...
 
virtual void setValues ()=0
 produce changes to PSO state for current iteration More...
 

Private Attributes

Real c0_
 
Real threshold_
 
Size M_
 
Size N_
 
Size maxIterations_
 
Size iteration_
 

Additional Inherited Members

- Protected Member Functions inherited from ParticleSwarmOptimization::Inertia
virtual void init (ParticleSwarmOptimization *pso)
 
- Protected Attributes inherited from ParticleSwarmOptimization::Inertia
ParticleSwarmOptimizationpso_
 
std::vector< Array > * X_
 
std::vector< Array > * V_
 
std::vector< Array > * pBX_
 
std::vector< Array > * gBX_
 
ArraypBF_
 
ArraygBF_
 
ArraylX_
 
ArrayuX_
 

Detailed Description

Decreasing Inertia.

Definition at line 205 of file particleswarmoptimization.hpp.

Constructor & Destructor Documentation

◆ DecreasingInertia()

DecreasingInertia ( Real  threshold = 0.5)

Definition at line 207 of file particleswarmoptimization.hpp.

Member Function Documentation

◆ setSize()

void setSize ( Size  M,
Size  N,
Real  c0,
const EndCriteria endCriteria 
)
overridevirtual

initialize state for current problem

Implements ParticleSwarmOptimization::Inertia.

Definition at line 211 of file particleswarmoptimization.hpp.

+ Here is the call graph for this function:

◆ setValues()

void setValues ( )
overridevirtual

produce changes to PSO state for current iteration

Implements ParticleSwarmOptimization::Inertia.

Definition at line 217 of file particleswarmoptimization.hpp.

Member Data Documentation

◆ c0_

Real c0_
private

Definition at line 225 of file particleswarmoptimization.hpp.

◆ threshold_

Real threshold_
private

Definition at line 225 of file particleswarmoptimization.hpp.

◆ M_

Size M_
private

Definition at line 226 of file particleswarmoptimization.hpp.

◆ N_

Size N_
private

Definition at line 226 of file particleswarmoptimization.hpp.

◆ maxIterations_

Size maxIterations_
private

Definition at line 226 of file particleswarmoptimization.hpp.

◆ iteration_

Size iteration_
private

Definition at line 226 of file particleswarmoptimization.hpp.