Simp Class Template Reference

Class template calculates definite integrals for user-supplied functions using the second-order Simpson rule. More...

#include <Intg.h>

Inherits Intg< xType, yType >.

Inheritance diagram for Simp:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Simp (const Intg< xType, yType > &ig)
 Simp (const Simp &si)
 Simp (yType(&rFn)(xType), xType dEps)
 ~Simp (void)

Detailed Description

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

Class template calculates definite integrals for user-supplied functions using the second-order Simpson rule.

Successively smaller step-sizes are used within the integration interval, until an approximated error is acheived. Simpson's rule curve-fits derivative evaluations with quadratic polynomial equations (2nd order polynomials) and integrates under the curve-fit.

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

Simp ( 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);

Simp ( const Simp< xType, yType > &  si  ) 

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

Parameters:
si a reference to a function integration object

Simp ( 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

~Simp ( void   ) 

Destructor is a place holder, no dynamic memory is allocated.


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