Flood::IntegrationOfFunctions Class Reference

#include <IntegrationOfFunctions.h>

List of all members.

Public Member Functions

 IntegrationOfFunctions (void)
virtual ~IntegrationOfFunctions (void)
double calculate_trapezoid_integral (double(*f)(double), double, double, int)
double calculate_Simpson_integral (double(*f)(double), double, double, int)
double calculate_trapezoid_integral (const Vector< double > &, const Vector< double > &)
double calculate_Simpson_integral (const Vector< double > &, const Vector< double > &)
template<class T >
double calculate_trapezoid_integral (T &t, double(T::*f)(double), double a, double b, int n)
template<class T >
double calculate_Simpson_integral (T &t, double(T::*f)(double), double a, double b, int n)


Detailed Description

This class contains methods for numerical integration of functions. In particular it implements the trapezoid method and the Simpson's method.

Definition at line 27 of file IntegrationOfFunctions.h.


Constructor & Destructor Documentation

Flood::IntegrationOfFunctions::IntegrationOfFunctions ( void   )  [explicit]

General constructor.

Definition at line 28 of file IntegrationOfFunctions.cpp.

Flood::IntegrationOfFunctions::~IntegrationOfFunctions ( void   )  [virtual]

Destructor.

Definition at line 38 of file IntegrationOfFunctions.cpp.


Member Function Documentation

template<class T >
double Flood::IntegrationOfFunctions::calculate_Simpson_integral ( T &  t,
double(T::*)(double)  f,
double  a,
double  b,
int  n 
) [inline]

This method evaluates the integral of a function given as a class member method using the composite Simpsons rule with n intervals.

Parameters:
t : Object constructor containing the member method to integrate.
f,: Pointer to the member method.
a,: Lower integration limit.
b,: Upper integration limit.
n,: Number of intervals.

Definition at line 108 of file IntegrationOfFunctions.h.

double Flood::IntegrationOfFunctions::calculate_Simpson_integral ( const Vector< double > &  x,
const Vector< double > &  y 
)

This method evaluates the integral of a function given as a set of n pairs of data (x,y) using the composite Simpson's rule.

Parameters:
x Vector of x data.
y Vector of y data.

Definition at line 163 of file IntegrationOfFunctions.cpp.

double Flood::IntegrationOfFunctions::calculate_Simpson_integral ( double(*)(double)  f,
double  a,
double  b,
int  n 
)

This method evaluates the integral of a function given as a pointer to a C-style function using the composite Simpson rule with n intervals.

Parameters:
f Pointer to the C-style function to integrate.
a Lower integration limit.
b Upper integration limit.
n Number of intervals.

Definition at line 93 of file IntegrationOfFunctions.cpp.

template<class T >
double Flood::IntegrationOfFunctions::calculate_trapezoid_integral ( T &  t,
double(T::*)(double)  f,
double  a,
double  b,
int  n 
) [inline]

This method evaluates the integral of a function given as a class member method using the composite trapezoid rule with n intervals.

Parameters:
t : Object constructor containing the member method to integrate.
f,: Pointer to the member method.
a,: Lower integration limit.
b,: Upper integration limit.
n,: Number of intervals.

Definition at line 68 of file IntegrationOfFunctions.h.

double Flood::IntegrationOfFunctions::calculate_trapezoid_integral ( const Vector< double > &  x,
const Vector< double > &  y 
)

This method evaluates the integral of a function given as a set of n pairs of data (x,y) using the composite trapezoid rule.

Parameters:
x Vector of x data.
y Vector of y data.

Definition at line 134 of file IntegrationOfFunctions.cpp.

double Flood::IntegrationOfFunctions::calculate_trapezoid_integral ( double(*)(double)  f,
double  a,
double  b,
int  n 
)

This method evaluates the integral of a function given as a pointer to a C-style function using the composite trapezoid rule with n intervals.

Parameters:
f Pointer to the C-style function to integrate.
a Lower integration limit.
b Upper integration limit.
n Number of intervals.

Definition at line 57 of file IntegrationOfFunctions.cpp.


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

Generated on Fri Jul 30 09:52:00 2010 for Flood by  doxygen 1.5.9