Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EMMaximization Class Reference

#include <coresoftware/blob/master/simulation/g4simulation/g4main/EcoMug.h>

+ Collaboration diagram for EMMaximization:

Public Member Functions

 EMMaximization (const EMRandom &random, int genMethod)
 
void SetParameters (double minP, double maxP, double minTheta, double maxTheta)
 
void SetParameters (double minP, double maxP, double minTheta, double maxTheta, double minPhi, double maxPhi)
 
void SetFunction (std::function< double(double, double)> func)
 
double SkyFunc (double p, double theta)
 
double CylFunc (double p, double theta)
 
double HSFunc (double p, double theta, double phi, double theta0)
 
double Evaluate (std::vector< double > &v)
 
void Evaluate ()
 
void Init ()
 
void UpdateParameters (size_t t)
 
void Move ()
 
double Maximize ()
 

Static Public Member Functions

static double DefaultJ (double p, double theta)
 

Private Attributes

EMRandom mRandom
 
size_t mPopSize
 
size_t mNIter
 
int mGenMethod
 
double m_a
 
double m_a2
 
std::vector< std::vector
< double > > 
mRanges
 
std::vector< std::vector
< double > > 
mPopulation
 
double mBestCost
 
std::vector< doublemBestSolution
 
std::function< double(double,
double)> 
mFunc
 

Detailed Description

Class for maximization based on "Whale Optimization Algorithm" doi:10.1016/j.advengsoft.2016.01.008

Definition at line 97 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 97 of file EcoMug.h

Constructor & Destructor Documentation

EMMaximization::EMMaximization ( const EMRandom random,
int  genMethod 
)
inline

Definition at line 113 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 113 of file EcoMug.h

References DefaultJ(), and mFunc.

+ Here is the call graph for this function:

Member Function Documentation

double EMMaximization::CylFunc ( double  p,
double  theta 
)
inline

Definition at line 162 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 162 of file EcoMug.h

References mFunc.

Referenced by Evaluate().

+ Here is the caller graph for this function:

static double EMMaximization::DefaultJ ( double  p,
double  theta 
)
inlinestatic

Definition at line 127 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 127 of file EcoMug.h

References n.

Referenced by EMMaximization().

+ Here is the caller graph for this function:

double EMMaximization::Evaluate ( std::vector< double > &  v)
inline

Definition at line 174 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 174 of file EcoMug.h

References CylFunc(), HSFunc(), mGenMethod, and SkyFunc().

+ Here is the call graph for this function:

void EMMaximization::Evaluate ( )
inline

Definition at line 192 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 192 of file EcoMug.h

References i, mBestCost, mBestSolution, mPopSize, mPopulation, and value.

Referenced by Maximize().

+ Here is the caller graph for this function:

double EMMaximization::HSFunc ( double  p,
double  theta,
double  phi,
double  theta0 
)
inline

Definition at line 168 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 168 of file EcoMug.h

References mFunc.

Referenced by Evaluate().

+ Here is the caller graph for this function:

void EMMaximization::Init ( )
inline

Definition at line 207 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 207 of file EcoMug.h

References Acts::Test::dim, EMRandom::GenerateRandomDouble(), i, j, mPopSize, mPopulation, mRandom, and mRanges.

Referenced by Maximize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double EMMaximization::Maximize ( )
inline

Definition at line 272 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 272 of file EcoMug.h

References Evaluate(), Init(), mBestCost, mNIter, Move(), and UpdateParameters().

Referenced by EcoMug::ComputeMaximum(), and EcoMug::ComputeMaximumCustomJ().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EMMaximization::Move ( )
inline

Definition at line 229 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 229 of file EcoMug.h

References A, KFPMath::b, C, distance(), EMRandom::GenerateRandomDouble(), i, j, m_a, m_a2, mBestSolution, mPopulation, mRandom, mRanges, merge_hashes::p, r1, r2, and Acts::Test::tmp().

Referenced by Maximize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EMMaximization::SetFunction ( std::function< double(double, double)>  func)
inline

Definition at line 150 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 150 of file EcoMug.h

References mFunc.

Referenced by EcoMug::ComputeMaximumCustomJ().

+ Here is the caller graph for this function:

void EMMaximization::SetParameters ( double  minP,
double  maxP,
double  minTheta,
double  maxTheta 
)
inline

Definition at line 134 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 134 of file EcoMug.h

References mRanges.

Referenced by EcoMug::ComputeMaximum(), and EcoMug::ComputeMaximumCustomJ().

+ Here is the caller graph for this function:

void EMMaximization::SetParameters ( double  minP,
double  maxP,
double  minTheta,
double  maxTheta,
double  minPhi,
double  maxPhi 
)
inline

Definition at line 141 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 141 of file EcoMug.h

References Acts::Test::minPhi, and mRanges.

double EMMaximization::SkyFunc ( double  p,
double  theta 
)
inline

Definition at line 156 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 156 of file EcoMug.h

References mFunc.

Referenced by Evaluate().

+ Here is the caller graph for this function:

void EMMaximization::UpdateParameters ( size_t  t)
inline

Definition at line 222 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 222 of file EcoMug.h

References m_a, m_a2, and mNIter.

Referenced by Maximize().

+ Here is the caller graph for this function:

Member Data Documentation

double EMMaximization::m_a
private

Definition at line 104 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 104 of file EcoMug.h

Referenced by Move(), and UpdateParameters().

double EMMaximization::m_a2
private

Definition at line 105 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 105 of file EcoMug.h

Referenced by Move(), and UpdateParameters().

double EMMaximization::mBestCost
private

Definition at line 108 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 108 of file EcoMug.h

Referenced by Evaluate(), and Maximize().

std::vector<double> EMMaximization::mBestSolution
private

Definition at line 109 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 109 of file EcoMug.h

Referenced by Evaluate(), and Move().

std::function<double(double, double)> EMMaximization::mFunc
private

Definition at line 110 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 110 of file EcoMug.h

Referenced by CylFunc(), EMMaximization(), HSFunc(), SetFunction(), and SkyFunc().

int EMMaximization::mGenMethod
private

Definition at line 103 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 103 of file EcoMug.h

Referenced by Evaluate().

size_t EMMaximization::mNIter
private

Definition at line 102 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 102 of file EcoMug.h

Referenced by Maximize(), and UpdateParameters().

size_t EMMaximization::mPopSize
private

Definition at line 101 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 101 of file EcoMug.h

Referenced by Evaluate(), and Init().

std::vector<std::vector<double> > EMMaximization::mPopulation
private

Definition at line 107 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 107 of file EcoMug.h

Referenced by Evaluate(), Init(), and Move().

EMRandom EMMaximization::mRandom
private

Definition at line 100 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 100 of file EcoMug.h

Referenced by Init(), and Move().

std::vector<std::vector<double> > EMMaximization::mRanges
private

Definition at line 106 of file EcoMug.h.

View newest version in sPHENIX GitHub at line 106 of file EcoMug.h

Referenced by Init(), Move(), and SetParameters().


The documentation for this class was generated from the following file: