1#ifndef __JFIT__JSIMPLEX__
2#define __JFIT__JSIMPLEX__
18namespace JPP {
using namespace JFIT; }
41 template<
class JModel_t>
43 public JMessage< JSimplex<JModel_t> >
70 template<
class JFunction_t,
class T>
71 double operator()(
const JFunction_t& fit, T __begin, T __end)
78 const int N =
step.size();
96 for (
int i = 0; i != N; ++i) {
100 chi2[i] = (*this)(fit, __begin, __end,
step[i]);
108 const double chi2_new = (*this)(fit, __begin, __end,
wall);
123 const double fe =
evaluate(fit, __begin, __end);
128 for (
int i = N-1; i != 0; --i) {
129 chi2[i] = chi2[i-1] - chi2[i];
137 for (
int i = 0; i != N; ++i) {
151 for (
int i = 0; i != N - 1; ++i) {
177 template<
class JFunction_t,
class T>
230 lambda = factor * lambda;
252 template<
class JFunction_t,
class T>
257 for (T
hit = __begin;
hit != __end; ++
hit) {
273 template<
class JModel_t>
280 template<
class JModel_t>
General purpose messaging.
#define DEBUG(A)
Message macros.
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++,...
double operator()(const JFunction_t &fit, T __begin, T __end)
Multi-dimensional fit.
static int MAXIMUM_ITERATIONS
maximal number of iterations
std::vector< JModel_t > step
double operator()(const JFunction_t &fit, T __begin, T __end, const JModel_t &step)
1D fit.
static double EPSILON
maximal distance to minimum
JSimplex()
Default constructor.
double evaluate(const JFunction_t &fit, T __begin, T __end) const
Evaluate chi2 for given data set.
Template definition of a multi-dimensional oscillation probability interpolation table.
Auxiliary classes and methods for linear and iterative data regression.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Auxiliary class for handling debug parameter within a class.
static int debug
debug level (default is off).