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
AdaptiveInertia Class Reference

AdaptiveInertia. More...

#include <particleswarmoptimization.hpp>

+ Inheritance diagram for AdaptiveInertia:
+ Collaboration diagram for AdaptiveInertia:

Public Member Functions

 AdaptiveInertia (Real minInertia, Real maxInertia, Size sh=5, Size sl=2)
 
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 best_
 
Real minInertia_
 
Real maxInertia_
 
Size M_
 
Size sh_
 
Size sl_
 
Size adaptiveCounter
 
bool started_
 

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

AdaptiveInertia.

Definition at line 233 of file particleswarmoptimization.hpp.

Constructor & Destructor Documentation

◆ AdaptiveInertia()

AdaptiveInertia ( Real  minInertia,
Real  maxInertia,
Size  sh = 5,
Size  sl = 2 
)

Definition at line 235 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 238 of file particleswarmoptimization.hpp.

◆ setValues()

void setValues ( )
overridevirtual

produce changes to PSO state for current iteration

Implements ParticleSwarmOptimization::Inertia.

Definition at line 179 of file particleswarmoptimization.cpp.

Member Data Documentation

◆ c0_

Real c0_
private

Definition at line 248 of file particleswarmoptimization.hpp.

◆ best_

Real best_
private

Definition at line 248 of file particleswarmoptimization.hpp.

◆ minInertia_

Real minInertia_
private

Definition at line 249 of file particleswarmoptimization.hpp.

◆ maxInertia_

Real maxInertia_
private

Definition at line 249 of file particleswarmoptimization.hpp.

◆ M_

Size M_
private

Definition at line 250 of file particleswarmoptimization.hpp.

◆ sh_

Size sh_
private

Definition at line 251 of file particleswarmoptimization.hpp.

◆ sl_

Size sl_
private

Definition at line 251 of file particleswarmoptimization.hpp.

◆ adaptiveCounter

Size adaptiveCounter
private

Definition at line 252 of file particleswarmoptimization.hpp.

◆ started_

bool started_
private

Definition at line 253 of file particleswarmoptimization.hpp.