Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Math::IRootFinderMethod Class Referenceabstract

Interface for finding function roots of one-dimensional functions.

Definition at line 34 of file IRootFinderMethod.h.

Public Member Functions

 IRootFinderMethod ()
 Default Constructor.
 
virtual ~IRootFinderMethod ()
 Default Destructor.
 
virtual int Iterate ()
 This method is implemented only by the GSLRootFinder and GSLRootFinderDeriv classes and will return an error if it's not one of them.
 
virtual int Iterations () const
 Return number of iterations used to find the root Must be implemented by derived classes.
 
virtual const char * Name () const =0
 Return name of root finder algorithm.
 
virtual double Root () const =0
 Returns the previously calculated root.
 
virtual bool SetFunction (const ROOT::Math::IGenFunction &, double, double)
 Sets the function for the rest of the algorithms.
 
virtual bool SetFunction (const ROOT::Math::IGradFunction &, double)
 Sets the function for algorithms using derivatives.
 
virtual bool Solve (int maxIter=100, double absTol=1E-8, double relTol=1E-10)=0
 Stimates the root for the function.
 
virtual int Status () const =0
 Returns the status of the previous estimate.
 

#include <Math/IRootFinderMethod.h>

Inheritance diagram for ROOT::Math::IRootFinderMethod:
[legend]

Constructor & Destructor Documentation

◆ ~IRootFinderMethod()

virtual ROOT::Math::IRootFinderMethod::~IRootFinderMethod ( )
inlinevirtual

Default Destructor.

Definition at line 37 of file IRootFinderMethod.h.

◆ IRootFinderMethod()

ROOT::Math::IRootFinderMethod::IRootFinderMethod ( )
inline

Default Constructor.

Definition at line 40 of file IRootFinderMethod.h.

Member Function Documentation

◆ Iterate()

virtual int ROOT::Math::IRootFinderMethod::Iterate ( )
inlinevirtual

This method is implemented only by the GSLRootFinder and GSLRootFinderDeriv classes and will return an error if it's not one of them.

Reimplemented in ROOT::Math::GSLRootFinder, and ROOT::Math::GSLRootFinderDeriv.

Definition at line 79 of file IRootFinderMethod.h.

◆ Iterations()

virtual int ROOT::Math::IRootFinderMethod::Iterations ( ) const
inlinevirtual

Return number of iterations used to find the root Must be implemented by derived classes.

Reimplemented in ROOT::Math::BrentRootFinder, ROOT::Math::GSLRootFinder, and ROOT::Math::GSLRootFinderDeriv.

Definition at line 87 of file IRootFinderMethod.h.

◆ Name()

virtual const char * ROOT::Math::IRootFinderMethod::Name ( ) const
pure virtual

Return name of root finder algorithm.

Implemented in ROOT::Math::BrentRootFinder, ROOT::Math::GSLRootFinder, and ROOT::Math::GSLRootFinderDeriv.

◆ Root()

virtual double ROOT::Math::IRootFinderMethod::Root ( ) const
pure virtual

Returns the previously calculated root.

Implemented in ROOT::Math::BrentRootFinder, ROOT::Math::GSLRootFinder, and ROOT::Math::GSLRootFinderDeriv.

◆ SetFunction() [1/2]

virtual bool ROOT::Math::IRootFinderMethod::SetFunction ( const ROOT::Math::IGenFunction ,
double  ,
double   
)
inlinevirtual

Sets the function for the rest of the algorithms.

The parameters set the interval where the root has to be calculated.

Reimplemented in ROOT::Math::GSLRootFinder, ROOT::Math::BrentRootFinder, ROOT::Math::GSLRootFinder, ROOT::Math::GSLRootFinderDeriv, and ROOT::Math::BrentRootFinder.

Definition at line 53 of file IRootFinderMethod.h.

◆ SetFunction() [2/2]

virtual bool ROOT::Math::IRootFinderMethod::SetFunction ( const ROOT::Math::IGradFunction ,
double   
)
inlinevirtual

Sets the function for algorithms using derivatives.


Reimplemented in ROOT::Math::GSLRootFinderDeriv, ROOT::Math::BrentRootFinder, ROOT::Math::GSLRootFinder, and ROOT::Math::GSLRootFinderDeriv.

Definition at line 45 of file IRootFinderMethod.h.

◆ Solve()

virtual bool ROOT::Math::IRootFinderMethod::Solve ( int  maxIter = 100,
double  absTol = 1E-8,
double  relTol = 1E-10 
)
pure virtual

Stimates the root for the function.

@param maxIter maximum number of iterations. @param absTol desired absolute error in the minimum position. @param absTol desired relative error in the minimum position.

Implemented in ROOT::Math::BrentRootFinder, ROOT::Math::GSLRootFinder, and ROOT::Math::GSLRootFinderDeriv.

◆ Status()

virtual int ROOT::Math::IRootFinderMethod::Status ( ) const
pure virtual

Returns the status of the previous estimate.

Implemented in ROOT::Math::BrentRootFinder, ROOT::Math::GSLRootFinder, and ROOT::Math::GSLRootFinderDeriv.


The documentation for this class was generated from the following file: