OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Public Attributes | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Match Class Reference

Matching block. More...

#include <Match.h>

Collaboration diagram for Match:
Collaboration graph
[legend]

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...
 
AbstractVarfindVariable (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 Matchblock = 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
 

Detailed Description

Matching block.

Definition at line 40 of file Match.h.

Member Typedef Documentation

typedef std::list<AbstractFun *> Match::FunList
private

Definition at line 113 of file Match.h.

typedef std::list<AbstractVar *> Match::VarList
private

Definition at line 109 of file Match.h.

Constructor & Destructor Documentation

Match::Match ( )

Constructor.

Definition at line 38 of file Match.cpp.

Match::~Match ( )

Definition at line 42 of file Match.cpp.

References theFunctions, and theVariables.

Match::Match ( const Match )
private

Member Function Documentation

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

Here is the call graph for this function:

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

bool Match::evaluate ( const Vector< double > &  x,
Vector< double > &  f 
)

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

Here is the call graph for this function:

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

Return count of function evaluations.

Definition at line 213 of file Match.cpp.

References callCount.

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

Get the flag for printing.

Definition at line 203 of file Match.cpp.

References printLevel.

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

void Match::operator= ( const Match )
private
void Match::print ( const char *  method,
MatchState  state 
)
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().

Here is the call graph for this function:

Member Data Documentation

Match * Match::block = 0
static
int Match::callCount
private

Definition at line 120 of file Match.h.

Referenced by evaluate(), getCallCount(), and print().

int Match::constraintCount
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().

int Match::printLevel
private

Definition at line 123 of file Match.h.

Referenced by getPrintLevel(), print(), and setPrintLevel().

FunList Match::theFunctions
private

Definition at line 114 of file Match.h.

Referenced by addFunction(), getFunctions(), print(), and ~Match().

VarList Match::theVariables
private

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