Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | Protected Member Functions | List of all members
G4INCL::RootFinder Class Reference

#include <G4INCLRootFinder.hh>

Static Public Member Functions

static G4bool solve (RootFunctor const *const f, const G4double x0)
 Numerically solve a one-dimensional equation. More...
 
static std::pair< G4double,
G4double > const
getSolution ()
 Get the solution of the last call to solve(). More...
 

Protected Member Functions

 RootFinder ()
 
 ~RootFinder ()
 

Detailed Description

Definition at line 64 of file G4INCLRootFinder.hh.

Constructor & Destructor Documentation

G4INCL::RootFinder::RootFinder ( )
inlineprotected

Definition at line 108 of file G4INCLRootFinder.hh.

G4INCL::RootFinder::~RootFinder ( )
inlineprotected

Definition at line 109 of file G4INCLRootFinder.hh.

Member Function Documentation

static std::pair<G4double,G4double> const& G4INCL::RootFinder::getSolution ( )
inlinestatic

Get the solution of the last call to solve().

Returns
the solution, as an (x,y) pair

Definition at line 83 of file G4INCLRootFinder.hh.

Here is the caller graph for this function:

G4bool G4INCL::RootFinder::solve ( RootFunctor const *const  f,
const G4double  x0 
)
static

Numerically solve a one-dimensional equation.

Numerically solves the equation f(x)==0. This implementation uses the false-position method.

If a root is found, it can be retrieved using the getSolution() method,

Parameters
fpointer to a RootFunctor
x0initial value of the function argument
Returns
true if a root was found

Definition at line 58 of file G4INCLRootFinder.cc.

Here is the call graph for this function:

Here is the caller graph for this function:


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