Geant4-11
Public Types | Public Member Functions | Private Attributes
G4Solver< Function > Class Template Reference

#include <G4Solver.hh>

Public Types

enum  { DefaultMaxIter = 100 }
 

Public Member Functions

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

Private Attributes

G4double a
 
G4double b
 
G4int MaxIter
 
G4double root
 
G4double tolerance
 

Detailed Description

template<class Function>
class G4Solver< Function >

Definition at line 40 of file G4Solver.hh.

Member Enumeration Documentation

◆ anonymous enum

template<class Function >
anonymous enum
Enumerator
DefaultMaxIter 

Definition at line 43 of file G4Solver.hh.

43{DefaultMaxIter = 100};
@ DefaultMaxIter
Definition: G4Solver.hh:43

Constructor & Destructor Documentation

◆ G4Solver() [1/3]

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

Definition at line 46 of file G4Solver.hh.

47 a(0.0), b(0.0), root(0.0) {};
#define DefaultTolerance
Definition: G4Solver.hh:38
G4double a
Definition: G4Solver.hh:101
G4int MaxIter
Definition: G4Solver.hh:95
G4double root
Definition: G4Solver.hh:105
G4double b
Definition: G4Solver.hh:102
G4double tolerance
Definition: G4Solver.hh:98

◆ G4Solver() [2/3]

template<class Function >
G4Solver< Function >::G4Solver ( const G4int  iterations,
const G4double  tol 
)
inline

Definition at line 49 of file G4Solver.hh.

49 :
50 MaxIter(iterations), tolerance(tol),
51 a(0.0), b(0.0), root(0.0) {};

◆ G4Solver() [3/3]

template<class Function >
G4Solver< Function >::G4Solver ( const G4Solver< Function > &  right)

Definition at line 35 of file G4Solver.cc.

36{
37 MaxIter = right.MaxIter;
38 tolerance = right.tolerance;
39 a = right.a;
40 b = right.b;
41 root = right.root;
42}

References G4Solver< Function >::a, G4Solver< Function >::b, G4Solver< Function >::MaxIter, G4Solver< Function >::root, and G4Solver< Function >::tolerance.

◆ ~G4Solver()

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

Definition at line 57 of file G4Solver.hh.

57{};

Member Function Documentation

◆ Bisection()

template<class Function >
G4bool G4Solver< Function >::Bisection ( Function &  theFunction)

◆ Brent()

template<class Function >
G4bool G4Solver< Function >::Brent ( Function &  theFunction)

◆ Crenshaw()

template<class Function >
G4bool G4Solver< Function >::Crenshaw ( Function &  theFunction)

◆ GetIntervalLowerLimit()

template<class Function >
G4double G4Solver< Function >::GetIntervalLowerLimit ( void  ) const
inline

Definition at line 71 of file G4Solver.hh.

71{return a;}

References G4Solver< Function >::a.

◆ GetIntervalUpperLimit()

template<class Function >
G4double G4Solver< Function >::GetIntervalUpperLimit ( void  ) const
inline

Definition at line 72 of file G4Solver.hh.

72{return b;}

References G4Solver< Function >::b.

◆ GetMaxIterations()

template<class Function >
G4int G4Solver< Function >::GetMaxIterations ( void  ) const
inline

Definition at line 64 of file G4Solver.hh.

64{return MaxIter;}

References G4Solver< Function >::MaxIter.

◆ GetRoot()

template<class Function >
G4double G4Solver< Function >::GetRoot ( void  ) const
inline

◆ GetTolerance()

template<class Function >
G4double G4Solver< Function >::GetTolerance ( void  ) const
inline

Definition at line 67 of file G4Solver.hh.

67{return tolerance;}

References G4Solver< Function >::tolerance.

◆ operator!=()

template<class Function >
G4bool G4Solver< Function >::operator!= ( const G4Solver< Function > &  right) const

Definition at line 64 of file G4Solver.cc.

65{
66 return !operator==(right);
67}
G4bool operator==(const G4Solver &right) const
Definition: G4Solver.cc:57

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

◆ operator=()

template<class Function >
G4Solver< Function > & G4Solver< Function >::operator= ( const G4Solver< Function > &  right)

Definition at line 46 of file G4Solver.cc.

47{
48 MaxIter = right.MaxIter;
49 tolerance = right.tolerance;
50 a = right.a;
51 b = right.b;
52 root = right.root;
53 return *this;
54}

References G4Solver< Function >::a, G4Solver< Function >::b, G4Solver< Function >::MaxIter, G4Solver< Function >::root, and G4Solver< Function >::tolerance.

◆ operator==()

template<class Function >
G4bool G4Solver< Function >::operator== ( const G4Solver< Function > &  right) const

Definition at line 57 of file G4Solver.cc.

58{
59 if (this == &right) return true;
60 else return false;
61}

◆ RegulaFalsi()

template<class Function >
G4bool G4Solver< Function >::RegulaFalsi ( Function &  theFunction)

◆ SetIntervalLimits()

template<class Function >
void G4Solver< Function >::SetIntervalLimits ( const G4double  Limit1,
const G4double  Limit2 
)

◆ SetMaxIterations()

template<class Function >
void G4Solver< Function >::SetMaxIterations ( const G4int  iterations)
inline

Definition at line 65 of file G4Solver.hh.

65{MaxIter=iterations;}

References G4Solver< Function >::MaxIter.

◆ SetTolerance()

template<class Function >
void G4Solver< Function >::SetTolerance ( const G4double  epsilon)
inline

Definition at line 68 of file G4Solver.hh.

G4double epsilon(G4double density, G4double temperature)

References epsilon(), and G4Solver< Function >::tolerance.

Field Documentation

◆ a

template<class Function >
G4double G4Solver< Function >::a
private

◆ b

template<class Function >
G4double G4Solver< Function >::b
private

◆ MaxIter

template<class Function >
G4int G4Solver< Function >::MaxIter
private

◆ root

template<class Function >
G4double G4Solver< Function >::root
private

◆ tolerance

template<class Function >
G4double G4Solver< Function >::tolerance
private

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