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

Base inertia class used to alter the PSO state. More...

#include <particleswarmoptimization.hpp>

+ Inheritance diagram for ParticleSwarmOptimization::Inertia:
+ Collaboration diagram for ParticleSwarmOptimization::Inertia:

Public Member Functions

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...
 

Protected Member Functions

virtual void init (ParticleSwarmOptimization *pso)
 

Protected Attributes

ParticleSwarmOptimizationpso_
 
std::vector< Array > * X_
 
std::vector< Array > * V_
 
std::vector< Array > * pBX_
 
std::vector< Array > * gBX_
 
ArraypBF_
 
ArraygBF_
 
ArraylX_
 
ArrayuX_
 

Friends

class ParticleSwarmOptimization
 

Detailed Description

Base inertia class used to alter the PSO state.

This pure virtual base class provides the access to the PSO state which the particular inertia algorithm will change upon each iteration.

Definition at line 127 of file particleswarmoptimization.hpp.

Constructor & Destructor Documentation

◆ ~Inertia()

virtual ~Inertia ( )
virtualdefault

Member Function Documentation

◆ setSize()

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

initialize state for current problem

Implemented in TrivialInertia, SimpleRandomInertia, DecreasingInertia, AdaptiveInertia, and LevyFlightInertia.

◆ setValues()

virtual void setValues ( )
pure virtual

produce changes to PSO state for current iteration

Implemented in TrivialInertia, SimpleRandomInertia, DecreasingInertia, AdaptiveInertia, and LevyFlightInertia.

◆ init()

virtual void init ( ParticleSwarmOptimization pso)
protectedvirtual

Reimplemented in LevyFlightInertia.

Definition at line 141 of file particleswarmoptimization.hpp.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ ParticleSwarmOptimization

friend class ParticleSwarmOptimization
friend

Definition at line 128 of file particleswarmoptimization.hpp.

Member Data Documentation

◆ pso_

ParticleSwarmOptimization* pso_
protected

Definition at line 136 of file particleswarmoptimization.hpp.

◆ X_

std::vector<Array>* X_
protected

Definition at line 137 of file particleswarmoptimization.hpp.

◆ V_

std::vector<Array> * V_
protected

Definition at line 137 of file particleswarmoptimization.hpp.

◆ pBX_

std::vector<Array> * pBX_
protected

Definition at line 137 of file particleswarmoptimization.hpp.

◆ gBX_

std::vector<Array> * gBX_
protected

Definition at line 137 of file particleswarmoptimization.hpp.

◆ pBF_

Array* pBF_
protected

Definition at line 138 of file particleswarmoptimization.hpp.

◆ gBF_

Array * gBF_
protected

Definition at line 138 of file particleswarmoptimization.hpp.

◆ lX_

Array* lX_
protected

Definition at line 139 of file particleswarmoptimization.hpp.

◆ uX_

Array * uX_
protected

Definition at line 139 of file particleswarmoptimization.hpp.