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 | Private Member Functions | Friends | List of all members
FireflyAlgorithm::Intensity Class Referenceabstract

Base intensity class. More...

#include <fireflyalgorithm.hpp>

+ Inheritance diagram for FireflyAlgorithm::Intensity:
+ Collaboration diagram for FireflyAlgorithm::Intensity:

Public Member Functions

virtual ~Intensity ()=default
 
void findBrightest ()
 find brightest firefly for each firefly More...
 

Protected Member Functions

virtual Real intensityImpl (Real valueX, Real valueY, Real distance)=0
 
Real distance (const Array &x, const Array &y) const
 

Protected Attributes

Size Mfa_
 
Size N_
 
const std::vector< Array > * x_
 
const std::vector< std::pair< Real, Size > > * values_
 
std::vector< Array > * xI_
 

Private Member Functions

void init (FireflyAlgorithm *fa)
 

Friends

class FireflyAlgorithm
 

Detailed Description

Base intensity class.

Derived classes need to implement only intensityImpl

Definition at line 110 of file fireflyalgorithm.hpp.

Constructor & Destructor Documentation

◆ ~Intensity()

virtual ~Intensity ( )
virtualdefault

Member Function Documentation

◆ findBrightest()

void findBrightest ( )

find brightest firefly for each firefly

Definition at line 221 of file fireflyalgorithm.cpp.

+ Here is the call graph for this function:

◆ intensityImpl()

virtual Real intensityImpl ( Real  valueX,
Real  valueY,
Real  distance 
)
protectedpure virtual

Implemented in ExponentialIntensity, and InverseLawSquareIntensity.

+ Here is the caller graph for this function:

◆ distance()

Real distance ( const Array x,
const Array y 
) const
protected

Definition at line 123 of file fireflyalgorithm.hpp.

+ Here is the caller graph for this function:

◆ init()

void init ( FireflyAlgorithm fa)
private

Definition at line 133 of file fireflyalgorithm.hpp.

Friends And Related Function Documentation

◆ FireflyAlgorithm

friend class FireflyAlgorithm
friend

Definition at line 111 of file fireflyalgorithm.hpp.

Member Data Documentation

◆ Mfa_

Size Mfa_
protected

Definition at line 117 of file fireflyalgorithm.hpp.

◆ N_

Size N_
protected

Definition at line 117 of file fireflyalgorithm.hpp.

◆ x_

const std::vector<Array>* x_
protected

Definition at line 118 of file fireflyalgorithm.hpp.

◆ values_

const std::vector<std::pair<Real, Size> >* values_
protected

Definition at line 119 of file fireflyalgorithm.hpp.

◆ xI_

std::vector<Array>* xI_
protected

Definition at line 120 of file fireflyalgorithm.hpp.