Jpp
18.0.0-rc.2
the software that should make you happy
|
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++, W.H. More...
#include <JSimplex.hh>
Public Types | |
typedef double | result_type |
Public Member Functions | |
JSimplex () | |
Default constructor. More... | |
template<class JFunction_t , class T > | |
double | operator() (const JFunction_t &fit, T __begin, T __end) |
Multi-dimensional fit. More... | |
template<class JFunction_t , class T > | |
double | operator() (const JFunction_t &fit, T __begin, T __end, const JModel_t &step) |
1D fit. More... | |
Public Attributes | |
JModel_t | value |
std::vector< JModel_t > | step |
int | numberOfIterations |
Static Public Attributes | |
static int | MAXIMUM_ITERATIONS = 1000 |
maximal number of iterations More... | |
static double | EPSILON = 1.0e-4 |
maximal distance to minimum More... | |
static int | debug = 0 |
debug level (default is off). More... | |
Private Member Functions | |
template<class JFunction_t , class T > | |
double | evaluate (const JFunction_t &fit, T __begin, T __end) const |
Evaluate chi2 for given data set. More... | |
Private Attributes | |
JModel_t | p0 |
JModel_t | p1 |
JModel_t | wall |
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++, W.H.
Press, S.A. Teukolsky, W.T. Vetterling and B.P. Flannery, Cambridge University Press.
The template argument refers to the model that should be fitted to the data. This data structure should have arithmetic capabalities.
The data member JSimplex::value corresponds to the start, current or final value of the model of the fit procedure. The data member JSimplex::step corresponds to the step directions. Note that the step directions may change during the fit. The template fit function should return the data type JGandalf::result_type which is composed of the values of the chi2 and gradient of a hit. The function operator returns the chi2 of the fit.
Definition at line 42 of file JSimplex.hh.
typedef double JFIT::JSimplex< JModel_t >::result_type |
Definition at line 47 of file JSimplex.hh.
|
inline |
|
inline |
Multi-dimensional fit.
The given fit function should return the equivalent of chi2 for the current value of the given model and a given data point.
fit | fit function |
__begin | begin of data |
__end | end of data |
Definition at line 71 of file JSimplex.hh.
|
inline |
1D fit.
The given fit function should return the equivalent of chi2 for the current value of the given model and a given data point.
fit | fit function |
__begin | begin of data |
__end | end of data |
step | step direction |
Definition at line 178 of file JSimplex.hh.
|
inlineprivate |
Evaluate chi2 for given data set.
fit | fit function |
__begin | begin of data |
__end | end of data |
Definition at line 253 of file JSimplex.hh.
|
static |
maximal number of iterations
maximal number of iterations.
Definition at line 237 of file JSimplex.hh.
|
static |
maximal distance to minimum
maximal distance to minimum.
Definition at line 238 of file JSimplex.hh.
JModel_t JFIT::JSimplex< JModel_t >::value |
Definition at line 240 of file JSimplex.hh.
std::vector<JModel_t> JFIT::JSimplex< JModel_t >::step |
Definition at line 241 of file JSimplex.hh.
int JFIT::JSimplex< JModel_t >::numberOfIterations |
Definition at line 242 of file JSimplex.hh.
|
mutableprivate |
Definition at line 264 of file JSimplex.hh.
|
mutableprivate |
Definition at line 265 of file JSimplex.hh.
|
mutableprivate |
Definition at line 266 of file JSimplex.hh.
|
staticinherited |
debug level (default is off).
Definition at line 45 of file JMessage.hh.