Romb Class Template Reference

Class template calculates definite integrals of user-supplied functions using the Romberg method of extrapolated error. More...

#include <Intg.h>

Inherits Intg< xType, yType >.

Inheritance diagram for Romb:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Romb (const Intg< xType, yType > &ig)
 Romb (const Romb &ro)
 Romb (yType(&rFn)(xType), xType dEps)
virtual bool setCount (int nMaximum)
 ~Romb (void)

Static Public Attributes

static const int DEF_POL_CNT = 5

Detailed Description

template<typename xType, typename yType>
class calc::Romb< xType, yType >

Class template calculates definite integrals of user-supplied functions using the Romberg method of extrapolated error.

Successively smaller step-sizes are used within the integration interval, until an approximated error is acheived. The Romberg method extrapolates an integral approximation at a zero step-size value based on non-zero step-size evaluations. The extrapolation uses a polynomial curve-fit. Variable step-size integral evaluations are made using the trapezoid rule (see calc::Trap class).

The declaration typename <xType> specifies the form of independent variables used in integral calculations. The declaration typename <yType> specifies the form of solution variables used in integral calculations. In general, the <yType> variables should be the equal or superset of the <xType> variables.

Author
efgeorge
Date
2006/07/19 13:21:43
Revision
1.3
Examples:

example_Intg.txt.


Constructor & Destructor Documentation

~Romb ( void   ) 

Destructor frees allocated memory.

Romb ( yType(&)(xType)  rFn,
xType  dEps 
)

Constructor initializes a function integration object.

Parameters:
rFn a reference to an integrand evaluation function
dEps required error of the calculated integral (|y| units)
Remarks:
  • The specified integration tolerance dEps must be greater than zero.
  • The specified function rFn(x) calculates an integrand value given an independent variable value.
  • The function rFn(x) accepts a single independent value (x units).
  • The function rFn(x) returns a single valued integrand value (y units) at the specified point x.
  • Function declaration: yType fn(xType x);

Romb ( const Romb< xType, yType > &  ro  ) 

Copy constructor initializes a function integration object from the specified existing integration object.

Parameters:
ro a reference to a function integration object

Romb ( const Intg< xType, yType > &  ig  ) 

Copy constructor initializes a function integration object from the specified existing integration object.

Parameters:
ig a reference to a function integration object


Member Function Documentation

bool setCount ( int  nMaximum  )  [virtual]

Virtual function sets the current maximum loop count used in the integration evaluation.

Parameters:
nMaximum the maximum loop count value
Returns:
status flag
  • false (successful execution)
  • true (execution error, parameter not set)
Remarks:
The loop count value nMaximum must be greater than zero.

Reimplemented from Intg.


Member Data Documentation

const int DEF_POL_CNT = 5 [static]

polynomial data point count in Romberg extrpolation


The documentation for this class was generated from the following files:
Generated on Wed Jul 19 09:24:22 2006 for CalcLib by  doxygen 1.4.7