Go to the documentation of this file. 1 #ifndef __JFIT__JGANDALF__
2 #define __JFIT__JGANDALF__
21 namespace JPP {
using namespace JFIT; }
44 template<
class JModel_t>
46 public JMessage< JGandalf<JModel_t> >
79 const JModel_t model) :
90 operator double()
const
121 template<
class JFunction_t,
class T1,
class T2>
123 T1 __begin1, T1 __end1,
124 T2 __begin2, T2 __end2)
137 result_type precursor = result_type(numeric_limits<double>::max(), JModel_t());
182 DEBUG(
"Hesse matrix:" << endl);
188 for (
int i = 0; i != N; ++i) {
194 h[i] = 1.0 / sqrt(
H(i,i));
200 for (
int i = 0; i != N; ++i) {
201 for (
int j = 0;
j != i; ++
j) {
202 H(
j,i) *=
h[i] *
h[
j];
207 for (
int i = 0; i != N; ++i) {
221 for (
int i = 0; i != N; ++i) {
224 for (
int j = 0;
j != N; ++
j) {
250 template<
class JFunction_t,
class T>
251 result_type
operator()(
const JFunction_t& fit, T __begin, T __end)
253 return (*
this)(fit, __begin, __end, __end, __end);
291 template<
class JFunction_t,
class T>
292 inline void evaluate(
const JFunction_t& fit, T __begin, T __end)
294 for (T hit = __begin; hit != __end; ++hit) {
301 for (
unsigned int i = 0; i !=
parameters.size(); ++i) {
319 template<
class JModel_t>
326 template<
class JModel_t>
333 template<
class JModel_t>
340 template<
class JModel_t>
347 template<
class JModel_t>
354 template<
class JModel_t>
361 template<
class JModel_t>
static double LAMBDA_MAX
maximal value control parameter
result_type operator()(const JFunction_t &fit, T1 __begin1, T1 __end1, T2 __begin2, T2 __end2)
Multi-dimensional fit of two data sets.
Auxiliary data structure for floating point format specification.
Auxiliary classes and methods for linear and iterative data regression.
static double LAMBDA_DOWN
multiplication factor control parameter
void evaluate(const JFunction_t &fit, T __begin, T __end)
Evaluate fit for given data set.
static int MAXIMUM_ITERATIONS
maximal number of iterations
static double EPSILON
maximal distance to minimum
result_type()
Default constructor.
Fit method based on the Levenberg-Marquardt method.
result_type(const double chi2, const JModel_t model)
Constructor.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static double PIVOT
minimal value diagonal element of matrix
static double LAMBDA_MIN
minimal value control parameter
std::vector< parameter_type > parameters
Auxiliary data structure for floating point format specification.
result_type operator()(const JFunction_t &fit, T __begin, T __end)
Multi-dimensional fit of one data set.
Data structure for return value of fit function.
JMatrixND & reset()
Set matrix to the null matrix.
JModel_t gradient
d(chi2)/d(...)
JModel_t::parameter_type parameter_type
Data type of fit parameter.
void invert()
Invert matrix according LDU decomposition.
#define DEBUG(A)
Message macros.
static double LAMBDA_UP
multiplication factor control parameter
JGandalf()
Default constructor.
void resize(const size_t size)
Resize matrix.
static int debug
debug level (default is off).
Auxiliary class for handling debug parameter within a class.