28 #ifndef ROOT_Math_GSLMultiRootFinder
29 #define ROOT_Math_GSLMultiRootFinder
33 #ifndef ROOT_Math_IFunction
37 #ifndef ROOT_Math_WrappedFunction
49 class GSLMultiRootBaseSolver;
174 template<
class FuncIterator>
177 for (FuncIterator itr = begin; itr != end; ++itr) {
195 template <
class Function>
212 const double *
X()
const;
216 const double *
FVal()
const;
219 const double *
Dx()
const;
228 bool Solve(
const double *
x,
int maxIter = 0,
double absTol = 0,
double relTol = 0);
239 const char *
Name()
const;
264 void PrintState(std::ostream & os = std::cout);
Class for Multidimensional root finding algorithms bassed on GSL.
std::vector< ROOT::Math::IMultiGenFunction * > fFunctions
Namespace for new ROOT classes and functions.
const double * FVal() const
return the function values f(X) solving the system i.e.
GSLMultiRootBaseSolver, internal class for implementing GSL multi-root finders This is the base class...
void Clear()
clear list of functions
GSLMultiRootBaseSolver * fSolver
EType
enumeration specifying the types of GSL multi root finders which do not require the derivatives ...
GSLMultiRootFinder & operator=(const GSLMultiRootFinder &)
int Iterations() const
Return number of iterations.
int PrintLevel() const
return the print level
bool SetFunctionList(FuncIterator begin, FuncIterator end)
static void SetDefaultMaxIterations(int maxiter)
set maximum number of iterations
GSLMultiRootFinder(EType type)
create a multi-root finder based on an algorithm not requiring function derivative ...
static void SetDefaultTolerance(double abstol, double reltol=0)
set tolerance (absolute and relative) relative tolerance is only use to verify the convergence do it ...
int Status() const
Return the status of last root finding.
bool Solve(const double *x, int maxIter=0, double absTol=0, double relTol=0)
Find the root starting from the point X; Use the number of iteration and tolerance if given otherwise...
unsigned int Dim() const
return the number of sunctions set in the class.
int AddFunction(const ROOT::Math::IMultiGenFunction &func)
EDerivType
enumeration specifying the types of GSL multi root finders requiring the derivatives ...
GSLMultiRootFinder MultiRootFinder
const double * Dx() const
return the last step size
double func(double *x, double *p)
int AddFunction(Function &f, int ndim)
same method as before but using any function implementing the operator(), so can be wrapped in a IMul...
Template class to wrap any C++ callable object implementing operator() (const double * x) in a multi-...
Namespace for new Math classes and functions.
void SetType(EType type)
set the type for an algorithm without derivatives
const char * Name() const
Return the algorithm name.
std::pair< bool, int > GetType(const char *name)
void SetType(EDerivType type)
set the type of algorithm using derivatives
void SetPrintLevel(int level)
Documentation for the abstract class IBaseFunctionMultiDim.
void PrintState(std::ostream &os=std::cout)
print iteration state
const double * X() const
return the root X values solving the system
virtual ~GSLMultiRootFinder()
destructor