Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions
G4Solver< Function > Class Template Reference

#include <G4Solver.hh>

Public Types

enum  { DefaultMaxIter = 100 }
 

Public Member Functions

 G4Solver ()
 
 G4Solver (const G4int iterations, const G4double tol)
 
 G4Solver (const G4Solver &right)
 
 ~G4Solver ()
 
G4Solveroperator= (const G4Solver &right)
 
G4bool operator== (const G4Solver &right) const
 
G4bool operator!= (const G4Solver &right) const
 
G4int GetMaxIterations (void) const
 
void SetMaxIterations (const G4int iterations)
 
G4double GetTolerance (void) const
 
void SetTolerance (const G4double epsilon)
 
G4double GetIntervalLowerLimit (void) const
 
G4double GetIntervalUpperLimit (void) const
 
void SetIntervalLimits (const G4double Limit1, const G4double Limit2)
 
G4double GetRoot (void) const
 
G4bool Bisection (Function &theFunction)
 
G4bool RegulaFalsi (Function &theFunction)
 
G4bool Brent (Function &theFunction)
 
G4bool Crenshaw (Function &theFunction)
 

Detailed Description

template<class Function>
class G4Solver< Function >

Definition at line 41 of file G4Solver.hh.

Member Enumeration Documentation

template<class Function>
anonymous enum
Enumerator
DefaultMaxIter 

Definition at line 44 of file G4Solver.hh.

Constructor & Destructor Documentation

template<class Function>
G4Solver< Function >::G4Solver ( )
inline

Definition at line 47 of file G4Solver.hh.

47  : MaxIter(DefaultMaxIter), tolerance(DefaultTolerance),
48  a(0.0), b(0.0), root(0.0) {};
#define DefaultTolerance
Definition: G4Solver.hh:39
template<class Function>
G4Solver< Function >::G4Solver ( const G4int  iterations,
const G4double  tol 
)
inline

Definition at line 50 of file G4Solver.hh.

50  :
51  MaxIter(iterations), tolerance(tol),
52  a(0.0), b(0.0), root(0.0) {};
template<class Function >
G4Solver< Function >::G4Solver ( const G4Solver< Function > &  right)

Definition at line 36 of file G4Solver.cc.

References test::a, and test::b.

37 {
38  MaxIter = right.MaxIter;
39  tolerance = right.tolerance;
40  a = right.a;
41  b = right.b;
42  root = right.root;
43 }
template<class Function>
G4Solver< Function >::~G4Solver ( )
inline

Definition at line 58 of file G4Solver.hh.

58 {};

Member Function Documentation

template<class Function>
G4bool G4Solver< Function >::Bisection ( Function &  theFunction)
template<class Function>
G4bool G4Solver< Function >::Brent ( Function &  theFunction)
template<class Function>
G4bool G4Solver< Function >::Crenshaw ( Function &  theFunction)
template<class Function>
G4double G4Solver< Function >::GetIntervalLowerLimit ( void  ) const
inline

Definition at line 72 of file G4Solver.hh.

72 {return a;}
template<class Function>
G4double G4Solver< Function >::GetIntervalUpperLimit ( void  ) const
inline

Definition at line 73 of file G4Solver.hh.

73 {return b;}
template<class Function>
G4int G4Solver< Function >::GetMaxIterations ( void  ) const
inline

Definition at line 65 of file G4Solver.hh.

65 {return MaxIter;}
template<class Function>
G4double G4Solver< Function >::GetRoot ( void  ) const
inline
template<class Function>
G4double G4Solver< Function >::GetTolerance ( void  ) const
inline

Definition at line 68 of file G4Solver.hh.

68 {return tolerance;}
template<class Function >
G4bool G4Solver< Function >::operator!= ( const G4Solver< Function > &  right) const

Definition at line 65 of file G4Solver.cc.

References HepGeom::BasicVector3D< T >::operator==().

66 {
67  return !operator==(right);
68 }
G4bool operator==(const G4Solver &right) const
Definition: G4Solver.cc:58
template<class Function >
G4Solver< Function > & G4Solver< Function >::operator= ( const G4Solver< Function > &  right)

Definition at line 47 of file G4Solver.cc.

References test::a, and test::b.

48 {
49  MaxIter = right.MaxIter;
50  tolerance = right.tolerance;
51  a = right.a;
52  b = right.b;
53  root = right.root;
54  return *this;
55 }
template<class Function >
G4bool G4Solver< Function >::operator== ( const G4Solver< Function > &  right) const

Definition at line 58 of file G4Solver.cc.

59 {
60  if (this == &right) return true;
61  else return false;
62 }
template<class Function>
G4bool G4Solver< Function >::RegulaFalsi ( Function &  theFunction)
template<class Function>
void G4Solver< Function >::SetIntervalLimits ( const G4double  Limit1,
const G4double  Limit2 
)
template<class Function>
void G4Solver< Function >::SetMaxIterations ( const G4int  iterations)
inline

Definition at line 66 of file G4Solver.hh.

66 {MaxIter=iterations;}
template<class Function>
void G4Solver< Function >::SetTolerance ( const G4double  epsilon)
inline

Definition at line 69 of file G4Solver.hh.

69 {tolerance = epsilon;}

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