Loading...
Searching...
No Matches
BALL::NumericalIntegrator< Function, DataType > Class Template Reference
Foundation Classes » Mathematics » Function classes

`#include <BALL/MATHS/numericalIntegrator.h>`

## Public Member Functions

Constructors and destructor.
| NumericalIntegrator ()
| Default constructor.
| NumericalIntegrator (const NumericalIntegrator &nint)
| Copy constructor.
virtual | ~NumericalIntegrator ()
| Destructor.
Assignment
NumericalIntegrator & | operator= (const NumericalIntegrator &nint)
| Assignment operator.
Predicates
bool | operator== (const NumericalIntegrator &nint) const
| Equality operator.

## Accessors

Function | function_
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

## Detailed Description

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

Numerical integrator class.

Definition at line 20 of file numericalIntegrator.h.

## Constructor & Destructor Documentation

## NumericalIntegrator() [1/2]

template<typename Function, typename DataType>

BALL_INLINE BALL::NumericalIntegrator< Function, DataType >::NumericalIntegrator | ( |  | ) |

Default constructor.

Definition at line 104 of file numericalIntegrator.h.

## NumericalIntegrator() [2/2]

template<typename Function, typename DataType>

BALL_INLINE BALL::NumericalIntegrator< Function, DataType >::NumericalIntegrator | ( | const NumericalIntegrator< Function, DataType > & | nint | ) |

Copy constructor.

Definition at line 112 of file numericalIntegrator.h.

## ~NumericalIntegrator()

template<typename Function, typename DataType>

BALL_INLINE BALL::NumericalIntegrator< Function, DataType >::~NumericalIntegrator | ( |  | ) |

virtual

Destructor.

Definition at line 120 of file numericalIntegrator.h.

## Member Function Documentation

## getFunction() [1/2]

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

Definition at line 76 of file numericalIntegrator.h.

## getFunction() [2/2]

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

Definition at line 71 of file numericalIntegrator.h.

## getValue()

template<typename Function, typename DataType>

BALL_INLINE DataType BALL::NumericalIntegrator< Function, DataType >::getValue | ( | const DataType & | x | ) | const

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

Definition at line 155 of file numericalIntegrator.h.

## integrate()

template<typename Function, typename DataType>

BALL_INLINE DataType BALL::NumericalIntegrator< Function, DataType >::integrate | ( | const DataType & | from,
|  | const DataType & | to ) const

Integrate the function numerically

Parameters

  from | lower limit of the integration
  to | upper limit of the integration

Returns
  the value of the integral

Definition at line 163 of file numericalIntegrator.h.

## operator=()

template<typename Function, typename DataType>

BALL_INLINE NumericalIntegrator< Function, DataType > & BALL::NumericalIntegrator< Function, DataType >::operator= | ( | const NumericalIntegrator< Function, DataType > & | nint | ) |

Assignment operator.

Definition at line 128 of file numericalIntegrator.h.

## operator==()

template<typename Function, typename DataType>

BALL_INLINE bool BALL::NumericalIntegrator< Function, DataType >::operator== | ( | const NumericalIntegrator< Function, DataType > & | nint | ) | const

Equality operator.

Definition at line 146 of file numericalIntegrator.h.

## setFunction()

template<typename Function, typename DataType>

BALL_INLINE void BALL::NumericalIntegrator< Function, DataType >::setFunction | ( | const Function & | function | ) |

set the function to be integrated

Parameters

  the | function to be assigned

Definition at line 138 of file numericalIntegrator.h.

## Member Data Documentation

## function_

template<typename Function, typename DataType = float>

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

protected

Definition at line 97 of file numericalIntegrator.h.