CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
NAEquationSolver< Function > Class Template Reference

#include <EquationSolver.h>

Public Types

enum  { DefaultMaxIter = 100 }
 

Public Member Functions

bool Brent (Function &theFunction)
 
double GetIntervalLowerLimit (void) const
 
double GetIntervalUpperLimit (void) const
 
int GetMaxIterations (void) const
 
double GetRoot (void) const
 
double GetTolerance (void) const
 
 NAEquationSolver ()
 
 NAEquationSolver (const int iterations, const double tol)
 
 NAEquationSolver (const NAEquationSolver &right)
 
bool operator!= (const NAEquationSolver &right) const
 
NAEquationSolveroperator= (const NAEquationSolver &right)
 
bool operator== (const NAEquationSolver &right) const
 
void SetIntervalLimits (const double Limit1, const double Limit2)
 
void SetMaxIterations (const int iterations)
 
void SetTolerance (const double epsilon)
 
 ~NAEquationSolver ()
 

Private Attributes

double fA
 
double fB
 
int fMaxIter
 
double fRoot
 
double fTolerance
 

Detailed Description

template<class Function>
class NAEquationSolver< Function >

Definition at line 18 of file EquationSolver.h.

Member Enumeration Documentation

◆ anonymous enum

template<class Function>
anonymous enum
Enumerator
DefaultMaxIter 

Definition at line 20 of file EquationSolver.h.

20 { DefaultMaxIter = 100 };

Constructor & Destructor Documentation

◆ NAEquationSolver() [1/3]

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

Definition at line 34 of file EquationSolver.h.

◆ NAEquationSolver() [2/3]

template<class Function>
NAEquationSolver< Function >::NAEquationSolver ( const int  iterations,
const double  tol 
)
inline

Definition at line 36 of file EquationSolver.h.

37  : fMaxIter(iterations), fTolerance(tol), fA(0.0), fB(0.0), fRoot(0.0){};

◆ NAEquationSolver() [3/3]

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

◆ ~NAEquationSolver()

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

Definition at line 43 of file EquationSolver.h.

43 {};

Member Function Documentation

◆ Brent()

template<class Function>
bool NAEquationSolver< Function >::Brent ( Function &  theFunction)

◆ GetIntervalLowerLimit()

template<class Function>
double NAEquationSolver< Function >::GetIntervalLowerLimit ( void  ) const
inline

◆ GetIntervalUpperLimit()

template<class Function>
double NAEquationSolver< Function >::GetIntervalUpperLimit ( void  ) const
inline

◆ GetMaxIterations()

template<class Function>
int NAEquationSolver< Function >::GetMaxIterations ( void  ) const
inline

◆ GetRoot()

template<class Function>
double NAEquationSolver< Function >::GetRoot ( void  ) const
inline

◆ GetTolerance()

template<class Function>
double NAEquationSolver< Function >::GetTolerance ( void  ) const
inline

◆ operator!=()

template<class Function >
bool NAEquationSolver< Function >::operator!= ( const NAEquationSolver< Function > &  right) const

Definition at line 42 of file EquationSolver.cc.

42  {
43  return !operator==(right);
44 }

References operator==().

◆ operator=()

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

◆ operator==()

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

Definition at line 34 of file EquationSolver.cc.

34  {
35  if (this == &right)
36  return true;
37  else
38  return false;
39 }

◆ SetIntervalLimits()

template<class Function>
void NAEquationSolver< Function >::SetIntervalLimits ( const double  Limit1,
const double  Limit2 
)

◆ SetMaxIterations()

template<class Function>
void NAEquationSolver< Function >::SetMaxIterations ( const int  iterations)
inline

Definition at line 51 of file EquationSolver.h.

51 { fMaxIter = iterations; }

References NAEquationSolver< Function >::fMaxIter.

◆ SetTolerance()

template<class Function>
void NAEquationSolver< Function >::SetTolerance ( const double  epsilon)
inline

Member Data Documentation

◆ fA

template<class Function>
double NAEquationSolver< Function >::fA
private

◆ fB

template<class Function>
double NAEquationSolver< Function >::fB
private

◆ fMaxIter

template<class Function>
int NAEquationSolver< Function >::fMaxIter
private

◆ fRoot

template<class Function>
double NAEquationSolver< Function >::fRoot
private

Definition at line 30 of file EquationSolver.h.

Referenced by NAEquationSolver< Function >::GetRoot().

◆ fTolerance

template<class Function>
double NAEquationSolver< Function >::fTolerance
private
NAEquationSolver::operator==
bool operator==(const NAEquationSolver &right) const
Definition: EquationSolver.cc:34
NAEquationSolver::GetIntervalUpperLimit
double GetIntervalUpperLimit(void) const
Definition: EquationSolver.h:57
NAEquationSolver::fMaxIter
int fMaxIter
Definition: EquationSolver.h:24
NAEquationSolver::fB
double fB
Definition: EquationSolver.h:28
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
NAEquationSolver::fA
double fA
Definition: EquationSolver.h:27
NAEquationSolver::GetTolerance
double GetTolerance(void) const
Definition: EquationSolver.h:53
NAEquationSolver::DefaultMaxIter
Definition: EquationSolver.h:20
NAEquationSolver::GetMaxIterations
int GetMaxIterations(void) const
Definition: EquationSolver.h:50
NAEquationSolver::GetRoot
double GetRoot(void) const
Definition: EquationSolver.h:61
NAEquationSolver::fRoot
double fRoot
Definition: EquationSolver.h:30
NAEquationSolver::GetIntervalLowerLimit
double GetIntervalLowerLimit(void) const
Definition: EquationSolver.h:56
DefaultTolerance
#define DefaultTolerance
Definition: EquationSolver.h:15
NAEquationSolver::fTolerance
double fTolerance
Definition: EquationSolver.h:25