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

#include <BALL/MATHS/numericalIntegrator.h>

List of all members.


Public Member Functions

Constructors and destructor.
 NumericalIntegrator ()
 

Default constructor.


 NumericalIntegrator (const NumericalIntegrator &nint)
 

Copy constructor.


virtual ~NumericalIntegrator ()
 

Destructor.


Assignment
NumericalIntegratoroperator= (const NumericalIntegrator &nint)
 

Assignment operator.


Predicates
bool operator== (const NumericalIntegrator &nint) const
 

Equality operator.


Accessors
void setFunction (const Function &function)
const Function & getFunction () const
Function & getFunction ()
DataType getValue (const DataType &x) const
DataType integrate (const DataType &from, const DataType &to) const

Protected Attributes

Function function_

Detailed Description

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

Numerical integrator class.


Constructor & Destructor Documentation

template<typename Function , typename DataType >
BALL_INLINE BALL::NumericalIntegrator< Function, DataType >::NumericalIntegrator (  )  [inline]

Default constructor.

template<typename Function , typename DataType >
BALL_INLINE BALL::NumericalIntegrator< Function, DataType >::NumericalIntegrator ( const NumericalIntegrator< Function, DataType > &  nint  )  [inline]

Copy constructor.

template<typename Function , typename DataType >
BALL_INLINE BALL::NumericalIntegrator< Function, DataType >::~NumericalIntegrator (  )  [inline, virtual]

Destructor.


Member Function Documentation

template<typename Function, typename DataType = float>
Function& BALL::NumericalIntegrator< Function, DataType >::getFunction (  )  [inline]

Get the function to be integrated (const version).

Returns:
a mutable reference to the actual function
template<typename Function, typename DataType = float>
const Function& BALL::NumericalIntegrator< Function, DataType >::getFunction (  )  const [inline]

Get the function to be integrated (const version).

Returns:
a const reference to the actual function
template<typename Function , typename DataType>
BALL_INLINE DataType BALL::NumericalIntegrator< Function, DataType >::getValue ( const DataType &  x  )  const [inline]

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>
BALL_INLINE DataType BALL::NumericalIntegrator< Function, DataType >::integrate ( const DataType &  from,
const DataType &  to 
) const [inline]

Integrate the function numerically

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

References BALL::NumericalIntegrator< Function, DataType >::function_.

template<typename Function , typename DataType >
BALL_INLINE NumericalIntegrator< Function, DataType > & BALL::NumericalIntegrator< Function, DataType >::operator= ( const NumericalIntegrator< Function, DataType > &  nint  )  [inline]

Assignment operator.

template<typename Function , typename DataType >
BALL_INLINE bool BALL::NumericalIntegrator< Function, DataType >::operator== ( const NumericalIntegrator< Function, DataType > &  nint  )  const [inline]

Equality operator.

template<typename Function, typename DataType >
BALL_INLINE void BALL::NumericalIntegrator< Function, DataType >::setFunction ( const Function &  function  )  [inline]

set the function to be integrated

Parameters:
the function to be assigned

References BALL::NumericalIntegrator< Function, DataType >::function_.


Member Data Documentation