Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

NumericalIntegrator< Function, DataType > Class Template Reference
[Function classes]

Numerical integrator class. More...

#include <numericalIntegrator.h>

Inheritance diagram for NumericalIntegrator< Function, DataType >:

RombergIntegrator< Function, DataType > List of all members.

Public Member Functions

Constructors and destructor.
 NumericalIntegrator () throw ()
 Default constructor.
 NumericalIntegrator (const NumericalIntegrator &nint) throw ()
 Copy constructor.
virtual ~NumericalIntegrator () throw ()
 Destructor.
Assignment
NumericalIntegratoroperator= (const NumericalIntegrator &nint) throw ()
 Assignment operator.
Predicates
bool operator== (const NumericalIntegrator &nint) const throw ()
 Equality operator.
Accessors
void setFunction (const Function &function) throw ()
 set the function to be integrated
const Function & getFunction () const throw ()
 Get the function to be integrated (const version).
Function & getFunction () throw ()
 Get the function to be integrated (const version).
DataType getValue (const DataType &x) const throw ()
 Get the value of the function at position x .
DataType integrate (const DataType &from, const DataType &to) const throw ()
 Integrate the function numerically.

Protected Attributes

Function function_

Detailed Description

template<typename Function, typename DataType = float>
class NumericalIntegrator< Function, DataType >

Numerical integrator class.


Member Function Documentation

template<typename Function, typename DataType = float>
Function& NumericalIntegrator< Function, DataType >::getFunction  )  throw ()
 

Get the function to be integrated (const version).

Returns:
a mutable reference to the actual function

template<typename Function, typename DataType = float>
const Function& NumericalIntegrator< Function, DataType >::getFunction  )  const throw ()
 

Get the function to be integrated (const version).

Returns:
a const reference to the actual function

template<typename Function, typename DataType>
DataType NumericalIntegrator< Function, DataType >::getValue const DataType &  x  )  const throw ()
 

Get the value of the function at position x .

Parameters:
x the position at which function is to be evaluated
Returns:
the value of function at x

template<typename Function, typename DataType>
DataType NumericalIntegrator< Function, DataType >::integrate const DataType &  from,
const DataType &  to
const throw ()
 

Integrate the function numerically.

Parameters:
from lower limit of the integration
to upper limit of the integration
Returns:
the value of the integral

template<typename Function, typename DataType>
void NumericalIntegrator< Function, DataType >::setFunction const Function &  function  )  throw ()
 

set the function to be integrated

Parameters:
the function to be assigned