7 #ifndef BALL_MATHS_NUMERICALINTEGRATOR_H 8 #define BALL_MATHS_NUMERICALINTEGRATOR_H 10 #ifndef BALL_MATHS_FUNCTION_H 19 template <
typename Function,
typename DataType =
float>
82 DataType
getValue(
const DataType& x)
const;
89 DataType
integrate(
const DataType& from,
const DataType& to)
const;
102 template<
typename Function,
typename DataType>
110 template<
typename Function,
typename DataType>
118 template<
typename Function,
typename DataType>
125 template<
typename Function,
typename DataType>
136 template<
typename Function,
typename DataType>
144 template<
typename Function,
typename DataType>
146 bool NumericalIntegrator<Function, DataType>::operator ==
153 template<
typename Function,
typename DataType>
161 template<
typename Function,
typename DataType>
164 const DataType& from,
const DataType& to)
const 172 DataType step = (to - from) / n;
186 #endif // BALL_MATHS_NUMERICALINTEGRATOR_H bool operator==(const NumericalIntegrator &nint) const
Equality operator.
const Function & getFunction() const
DataType integrate(const DataType &from, const DataType &to) const
DataType getValue(const DataType &x) const
virtual ~NumericalIntegrator()
Destructor.
NumericalIntegrator & operator=(const NumericalIntegrator &nint)
Assignment operator.
NumericalIntegrator()
Default constructor.
void setFunction(const Function &function)
#define BALL_CREATE(name)