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

Base topology class used to determine the personal and global best. More...

#include <particleswarmoptimization.hpp>

+ Inheritance diagram for ParticleSwarmOptimization::Topology:
+ Collaboration diagram for ParticleSwarmOptimization::Topology:

Public Member Functions

virtual ~Topology ()=default
 
virtual void setSize (Size M)=0
 initialize state for current problem More...
 
virtual void findSocialBest ()=0
 produce changes to PSO state for current iteration More...
 

Protected Attributes

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

Private Member Functions

void init (ParticleSwarmOptimization *pso)
 

Friends

class ParticleSwarmOptimization
 

Detailed Description

Base topology class used to determine the personal and global best.

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

Definition at line 318 of file particleswarmoptimization.hpp.

Constructor & Destructor Documentation

◆ ~Topology()

virtual ~Topology ( )
virtualdefault

Member Function Documentation

◆ setSize()

virtual void setSize ( Size  M)
pure virtual

initialize state for current problem

Implemented in GlobalTopology, KNeighbors, and ClubsTopology.

◆ findSocialBest()

virtual void findSocialBest ( )
pure virtual

produce changes to PSO state for current iteration

Implemented in GlobalTopology, KNeighbors, and ClubsTopology.

◆ init()

void init ( ParticleSwarmOptimization pso)
private

Definition at line 331 of file particleswarmoptimization.hpp.

Friends And Related Function Documentation

◆ ParticleSwarmOptimization

friend class ParticleSwarmOptimization
friend

Definition at line 319 of file particleswarmoptimization.hpp.

Member Data Documentation

◆ pso_

ParticleSwarmOptimization* pso_
protected

Definition at line 327 of file particleswarmoptimization.hpp.

◆ X_

std::vector<Array>* X_
protected

Definition at line 328 of file particleswarmoptimization.hpp.

◆ V_

std::vector<Array> * V_
protected

Definition at line 328 of file particleswarmoptimization.hpp.

◆ pBX_

std::vector<Array> * pBX_
protected

Definition at line 328 of file particleswarmoptimization.hpp.

◆ gBX_

std::vector<Array> * gBX_
protected

Definition at line 328 of file particleswarmoptimization.hpp.

◆ pBF_

Array* pBF_
protected

Definition at line 329 of file particleswarmoptimization.hpp.

◆ gBF_

Array * gBF_
protected

Definition at line 329 of file particleswarmoptimization.hpp.