Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

TET::Math::Numeric_Object Class Reference

Base class for objects that use numerical algorithms with locally stored parameters. More...

#include <tetmathnumobj.h>

Inheritance diagram for TET::Math::Numeric_Object:

Inheritance graph
[legend]
List of all members.

Public Member Functions

Private Attributes


Detailed Description

Base class for objects that use numerical algorithms with locally stored parameters.

This class provides parameters that often occur in numeric computations, such as accuracy or maximum number of iterations.

In contrast to a Global_Numeric_Object, the parameters are stored on an per-object basis, i.e. each instantiated object has its own set of parameters. This can be used if only a few objects will be instantiated, with the most common example of a function object, where each function object class inherits Numeric_Object so that the parameters can best be adjusted to the underlying algorithms.

Invariant:
positive accuracy: accuracy() > 0.0

positive maximum number of iterations: max_Iter() > 0

Author:
Jens Hannemann (J.Hannemann@ieee.org)
Id
tetmathnumobj.h,v 1.12 2001/04/16 09:29:23 jh Exp

Definition at line 54 of file tetmathnumobj.h.


Constructor & Destructor Documentation

TET::Math::Numeric_Object::Numeric_Object const double  accuracy = 1.0e-10,
const unsigned int  max_iter = 50
 

Construct a numerics object with the given or default parameters.

Parameters:
accuracy desired accuracy for computations
max_iter maximum number of iterations in a computation
Precondition:
positive number of iterations: max_iter>0

positive accuracy: accuracy>0.0

Postcondition:
number has been saved: maxIt==max_iter

accuracy has been saved: accuracy == acc

Definition at line 26 of file tetmathnumobj.cpp.

virtual TET::Math::Numeric_Object::~Numeric_Object  )  [inline, virtual]
 

Virtual destructor.

Definition at line 134 of file tetmathnumobj.h.


Member Function Documentation

double TET::Math::Numeric_Object::accuracy  )  const [inline]
 

Returns:
currently set accuracy

Definition at line 176 of file tetmathnumobj.h.

Referenced by TET::Math::Adaptive_Quadrature< Return_Type >::compute(), TET::Math::Bessel_Neumann::compute_ev(), invariant(), and TET::Math::Bessel_Neumann::invariant().

bool TET::Math::Numeric_Object::invariant  )  const [inline]
 

Class invariant

Returns:
true, if invariant holds

Reimplemented in TET::Math::Bernstein_Polynomial, TET::Math::Bessel_Neumann, TET::Math::GSL_Quadrature, TET::Math::GSL_Complex_Quadrature, TET::Math::Oscillatory_Quadrature, TET::Math::Complex_Oscillatory_Quadrature, TET::Math::Quadrature< Return_Type >, TET::Math::Rectangular_Rule< Return_Type >, TET::Math::Simpsons_Rule< Return_Type >, TET::Math::Trapezoidal_Rule< Return_Type >, TET::Math::Quadrature< double >, and TET::Math::Quadrature< std::complex< double > >.

Definition at line 140 of file tetmathnumobj.h.

References accuracy(), and max_iteration().

unsigned long TET::Math::Numeric_Object::max_iteration  )  const [inline]
 

Returns:
currently set limit for iterations in computations

Definition at line 167 of file tetmathnumobj.h.

Referenced by invariant(), and TET::Math::Numeric_Object::Iteration_Counter::max_iteration().

bool TET::Math::Numeric_Object::set_accuracy const double  accuracy  )  [virtual]
 

Set accuracy for the current object.

Parameters:
accuracy value to set the accuracy to
Precondition:
positive accuracy: accuracy>0.0
Postcondition:
accuracy has been saved: acc==accuracy

accuracy can alway be saved: result==true

Definition at line 39 of file tetmathnumobj.cpp.

bool TET::Math::Numeric_Object::set_max_iteration const unsigned long  max  )  [virtual]
 

Set the maximum number of iterations for computations

Parameters:
max number of iterations
Precondition:
positive number of maximum iterations: max>0
Postcondition:
number has been saved: maxIt==max

number can always be saved: result==true

Definition at line 54 of file tetmathnumobj.cpp.


Member Data Documentation

double TET::Math::Numeric_Object::acc [private]
 

Definition at line 182 of file tetmathnumobj.h.

unsigned long TET::Math::Numeric_Object::maxIt [private]
 

Definition at line 183 of file tetmathnumobj.h.


The documentation for this class was generated from the following files:
Generated on Sun Apr 25 11:58:16 2004 for TETlib by doxygen 1.3.6