12 #ifndef __SIMLIB_OPTIMIZE_H 13 #define __SIMLIB_OPTIMIZE_H 32 name(0), min(0), max(0), value(min)
34 Param (
const char *n,
double a,
double b):
35 name(n), min(a), max(b), value(min)
44 operator double ()
const {
return value; }
61 int search(
const char *
name);
69 Param & operator[] (
int i) {
return p[i]; }
70 const Param & operator[] (
int i)
const {
return p[i]; }
71 int size()
const {
return n; }
72 void PrintValues()
const;
76 return p[search(name)];
87 double rho,
double epsilon,
int itermax);
96 #endif // __SIMLIB_OPTIMIZE_H double Optimize_gradient(opt_function_t f, ParameterVector &p, double MAXITER)
double Optimize_simann(double(*f)(const ParameterVector &p), ParameterVector &p, int MAXT)
Param(const char *n, double a, double b)
double Optimize_hooke(opt_function_t f, ParameterVector ¶meter, double rho, double epsilon, int itermax)
const char * Name() const
Implementation of class CalendarList interface is static - using global functions in SQS namespace...
bool operator==(const ParameterVector &p1, const ParameterVector &p2)
double(* opt_function_t)(const ParameterVector &p)
Param & operator[](const char *name)
Param & operator=(double x)