|
Jpp 21.0.0-rc.1-88-g0130508c4
the software that should make you happy
|
Conjugate gradient fit. More...
#include <JGradient.hh>
Public Member Functions | |
| JGradient (const size_t Nmax=std::numeric_limits< size_t >::max(), const size_t Nextra=0, const double epsilon=1.0e-4, const int debug=3) | |
| Constructor. | |
| template<class T > | |
| double | operator() (const T &getChi2) |
| Fit. | |
| template<class T > | |
| void | operator() (std::ostream &out, const T &getChi2, const std::vector< double > &xs) const |
| Make scan at current position. | |
Public Attributes | |
| size_t | Nmax |
| maximum number of iterations | |
| size_t | Nextra |
| maximum number of extra steps | |
| double | epsilon |
| epsilon | |
| int | debug |
| debug | |
| bool | absolute = false |
| absolute chi2 | |
| bool | normalise = false |
| normalise gradient | |
| size_t | numberOfIterations |
Private Member Functions | |
| template<class T > | |
| double | evaluate (const T &getChi2) |
| Evaluate gradient. | |
| void | move (const double factor) |
| Move. | |
| template<class T > | |
| void | scan (std::ostream &out, const T &getChi2, const std::vector< double > &xs, std::vector< double > &ys) const |
| Scan. | |
Private Attributes | |
| std::vector< double > | gradient |
Conjugate gradient fit.
Definition at line 74 of file JGradient.hh.
|
inline |
Constructor.
The number of iterations and epsilon refer to the number of steps and the distance to the minimum, respectively.
The number of extra steps can be used to overcome a possible hurdle on the way.
| Nmax | maximum number of iterations |
| Nextra | maximum number of extra steps |
| epsilon | epsilon |
| debug | debug |
Definition at line 89 of file JGradient.hh.
|
inline |
Fit.
The template parameter should provide for the following function operator.
double operator()(int option);
The value of the option corresponds to the following cases.
| getChi2 | chi2 function |
Definition at line 116 of file JGradient.hh.
|
inline |
Make scan at current position.
| out | output stream |
| getChi2 | chi2 function |
| xs | set of steps |
Definition at line 277 of file JGradient.hh.
|
inlineprivate |
Evaluate gradient.
Definition at line 312 of file JGradient.hh.
|
inlineprivate |
Move.
| factor | factor |
Definition at line 383 of file JGradient.hh.
|
inlineprivate |
Scan.
| out | output stream |
| getChi2 | chi2 function |
| xs | set of steps |
| ys | set of current steps |
Definition at line 406 of file JGradient.hh.
| size_t JFIT::JGradient::Nmax |
maximum number of iterations
Definition at line 295 of file JGradient.hh.
| size_t JFIT::JGradient::Nextra |
maximum number of extra steps
Definition at line 296 of file JGradient.hh.
| double JFIT::JGradient::epsilon |
epsilon
Definition at line 297 of file JGradient.hh.
| int JFIT::JGradient::debug |
debug
Definition at line 298 of file JGradient.hh.
| bool JFIT::JGradient::absolute = false |
absolute chi2
Definition at line 300 of file JGradient.hh.
| bool JFIT::JGradient::normalise = false |
normalise gradient
Definition at line 301 of file JGradient.hh.
| size_t JFIT::JGradient::numberOfIterations |
Definition at line 303 of file JGradient.hh.
|
private |
Definition at line 439 of file JGradient.hh.