OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Matching block. More...
#include <Match.h>
Public Member Functions | |
Match () | |
Constructor. More... | |
~Match () | |
void | addVariable (AbstractVar *) |
Add a matching variable. More... | |
void | deleteVariable (const std::string &name) |
Delete a matching variable. More... | |
AbstractVar * | findVariable (const std::string &name) |
Find a matching variable. More... | |
void | getVariables (Vector< double > &x) const |
Get values of matching variables. More... | |
void | setVariables (const Vector< double > &x) |
Set values of matching variables. More... | |
int | countVariables () const |
Get total number of variables. More... | |
void | addFunction (AbstractFun *) |
Add a set of matching function(s). More... | |
bool | evaluate (const Vector< double > &x, Vector< double > &f) |
Evaluate the matching functions. More... | |
void | getFunctions (Vector< double > &f) const |
Get cached values of matching functions. More... | |
int | countFunctions () const |
Return total number of functions. More... | |
void | print (const char *method, MatchState state) |
Print the results of minimisation. More... | |
int | getPrintLevel () const |
Get the flag for printing. More... | |
void | setPrintLevel (int) |
Set the flag for printing. More... | |
int | getCallCount () const |
Return count of function evaluations. More... | |
Public Attributes | |
MatchParser | parser |
The parser used during for matching. More... | |
Static Public Attributes | |
static Match * | block = 0 |
The block of match data. More... | |
Private Types | |
typedef std::list< AbstractVar * > | VarList |
typedef std::list< AbstractFun * > | FunList |
Private Member Functions | |
Match (const Match &) | |
void | operator= (const Match &) |
Private Attributes | |
VarList | theVariables |
FunList | theFunctions |
int | constraintCount |
int | callCount |
int | printLevel |
|
private |
|
private |
Match::~Match | ( | ) |
Definition at line 42 of file Match.cpp.
References theFunctions, and theVariables.
|
private |
void Match::addFunction | ( | AbstractFun * | fun | ) |
Add a set of matching function(s).
Definition at line 111 of file Match.cpp.
References constraintCount, AbstractFun::countConstraints(), and theFunctions.
Referenced by ConstraintCmd::execute().
void Match::addVariable | ( | AbstractVar * | var | ) |
Add a matching variable.
Definition at line 55 of file Match.cpp.
References theVariables.
Referenced by VaryCmd::execute().
int Match::countFunctions | ( | ) | const |
Return total number of functions.
Definition at line 140 of file Match.cpp.
References constraintCount.
Referenced by Migrad::derivatives(), Simplex::execute(), LMDif::execute(), and Migrad::hessenberg().
int Match::countVariables | ( | ) | const |
Get total number of variables.
Definition at line 106 of file Match.cpp.
References theVariables.
Referenced by Migrad::derivatives(), Simplex::execute(), Migrad::execute(), LMDif::execute(), Migrad::forcePositiveDefinite(), Migrad::hessenberg(), Migrad::invertSymmetric(), Migrad::lineSearch(), Simplex::razzia(), and Migrad::symmetricEigen().
void Match::deleteVariable | ( | const std::string & | name | ) |
Delete a matching variable.
Definition at line 60 of file Match.cpp.
References name, and theVariables.
Referenced by VaryCmd::execute().
Evaluate the matching functions.
Definition at line 117 of file Match.cpp.
References callCount, getFunctions(), OpalData::getInstance(), setVariables(), and OpalData::update().
Referenced by LMDif::execute(), LMDif::findJacobian(), and Migrad::lineSearch().
AbstractVar * Match::findVariable | ( | const std::string & | name | ) |
Find a matching variable.
Definition at line 72 of file Match.cpp.
References name, and theVariables.
int Match::getCallCount | ( | ) | const |
void Match::getFunctions | ( | Vector< double > & | f | ) | const |
Get cached values of matching functions.
Definition at line 129 of file Match.cpp.
References constraintCount, and theFunctions.
Referenced by evaluate(), and print().
int Match::getPrintLevel | ( | ) | const |
void Match::getVariables | ( | Vector< double > & | x | ) | const |
Get values of matching variables.
Definition at line 82 of file Match.cpp.
References theVariables.
Referenced by Simplex::execute(), Migrad::execute(), and LMDif::execute().
|
private |
void Match::print | ( | const char * | method, |
MatchState | state | ||
) |
Print the results of minimisation.
Definition at line 145 of file Match.cpp.
References Array1D< T >::begin(), callCount, constraintCount, Array1D< T >::end(), endl(), getFunctions(), OpalData::getInstance(), INTERNAL, Inform::precision(), printLevel, PROGRESS, sum(), theFunctions, theVariables, and OpalData::update().
Referenced by MatchEnd::execute(), Simplex::execute(), Migrad::execute(), and LMDif::execute().
void Match::setPrintLevel | ( | int | level | ) |
Set the flag for printing.
Definition at line 208 of file Match.cpp.
References printLevel.
Referenced by MatchOption::execute().
void Match::setVariables | ( | const Vector< double > & | x | ) |
Set values of matching variables.
Definition at line 93 of file Match.cpp.
References OpalData::getInstance(), OpalData::makeDirty(), and theVariables.
Referenced by Migrad::derivatives(), evaluate(), Simplex::execute(), Migrad::execute(), and Migrad::hessenberg().
|
static |
The block of match data.
Definition at line 100 of file Match.h.
Referenced by Migrad::derivatives(), MatchCmd::execute(), VaryCmd::execute(), ConstraintCmd::execute(), MatchEnd::execute(), MatchOption::execute(), Simplex::execute(), Migrad::execute(), LMDif::execute(), LMDif::findJacobian(), Migrad::forcePositiveDefinite(), Migrad::hessenberg(), Migrad::invertSymmetric(), Migrad::lineSearch(), Simplex::razzia(), and Migrad::symmetricEigen().
|
private |
Definition at line 120 of file Match.h.
Referenced by evaluate(), getCallCount(), and print().
|
private |
Definition at line 117 of file Match.h.
Referenced by addFunction(), countFunctions(), getFunctions(), and print().
MatchParser Match::parser |
The parser used during for matching.
Definition at line 97 of file Match.h.
Referenced by MatchCmd::execute(), and MatchEnd::execute().
|
private |
Definition at line 123 of file Match.h.
Referenced by getPrintLevel(), print(), and setPrintLevel().
|
private |
Definition at line 114 of file Match.h.
Referenced by addFunction(), getFunctions(), print(), and ~Match().
|
private |
Definition at line 110 of file Match.h.
Referenced by addVariable(), countVariables(), deleteVariable(), findVariable(), getVariables(), print(), setVariables(), and ~Match().