38 Match::Match(): parser(), constraintCount(0), callCount(0), printLevel(1)
63 if((*var)->getName() ==
name) {
75 if((*var)->getName() ==
name)
return *var;
88 x[j++] = (*var)->getInternalValue();
98 (*var)->setInternalValue(x[j++]);
135 (*fun)->evaluate(f, j);
146 static const char *str[] = {
164 cout <<
"\nMethod: " << method
165 <<
", Matching state: " << str[state] <<
", function calls = "
168 cout <<
"\nCurrent variable values:\n";
181 cout <<
"\nCurrent matching conditions:\n";
186 (*fun)->evaluate(f, index);
197 std::streamsize old_prec = cout.precision(12);
198 cout <<
"\nSum of squares = " << sum <<
std::endl;
void getFunctions(Vector< double > &f) const
Get cached values of matching functions.
AbstractVar * findVariable(const std::string &name)
Find a matching variable.
MatchState
The possible states of a matching process.
void setPrintLevel(int)
Set the flag for printing.
iterator end()
Get end of data.
Abstract base for matching constraints.
static Match * block
The block of match data.
virtual int countConstraints() const =0
Get number of constrained values.
int countFunctions() const
Return total number of functions.
void update()
Update all objects.
T::PETE_Expr_t::PETE_Return_t sum(const PETE_Expr< T > &expr)
void setVariables(const Vector< double > &x)
Set values of matching variables.
void print(const char *method, MatchState state)
Print the results of minimisation.
void addVariable(AbstractVar *)
Add a matching variable.
static OpalData * getInstance()
int countVariables() const
Get total number of variables.
void deleteVariable(const std::string &name)
Delete a matching variable.
iterator begin()
Get beginning of data.
bool evaluate(const Vector< double > &x, Vector< double > &f)
Evaluate the matching functions.
void addFunction(AbstractFun *)
Add a set of matching function(s).
std::string::iterator iterator
int getPrintLevel() const
Get the flag for printing.
Abstract base for a matching variable.
int getCallCount() const
Return count of function evaluations.
void getVariables(Vector< double > &x) const
Get values of matching variables.
Inform & endl(Inform &inf)
void makeDirty(Object *object)
Invalidate expressions.