1 #ifndef MATH_Integration_H 2 #define MATH_Integration_H 102 mBounds[0]=(a<b)?a:b;
103 mBounds[1]=(a>b)?a:b;
114 mBounds[0]=(a1<b1)?a1:b1;
115 mBounds[1]=(a1>b1)?a1:b1;
116 mBounds[2]=(a2<b2)?a2:b2;
117 mBounds[3]=(a2>b2)?a2:b2;
130 mBounds[0]=(a1<b1)?a1:b1;
131 mBounds[1]=(a1>b1)?a1:b1;
132 mBounds[2]=(a2<b2)?a2:b2;
133 mBounds[3]=(a2>b2)?a2:b2;
134 mBounds[4]=(a3<b3)?a3:b3;
135 mBounds[5]=(a3>b3)?a3:b3;
153 return (mFunction.lock().get()!=
null);
160 SPC::MATH_IntegrandFunction p=mFunction.lock();
167 SP::MATH_IntegrandFunction p=mFunction.lock();
SP_OBJECT(MATH_Integration)
void setFunction(SP::MATH_IntegrandFunction f)
set function to integrate
Definition: MATH_Integration.h:84
const tUIndex & getSize() const
return the size of the array for reading
Definition: CORE_Array.h:1018
virtual void copy(const MATH_Integration &integral)
copy the parameters of the optimization method
Definition: MATH_Integration.h:70
void setBounds(const tReal &a, const tReal &b)
set the interval of integration [a,b]
Definition: MATH_Integration.h:100
MATH_IntegrandFunction & getFunction()
get the integrand function
Definition: MATH_Integration.h:166
virtual void setBoundsCalled()=0
method called when intervals is modified
tUSInt getDimension() const
get the dimension of the integration
Definition: MATH_Integration.h:192
#define tUSInt
Definition: types.h:28
void setBounds(const tReal &a1, const tReal &b1, const tReal &a2, const tReal &b2)
set the integration domain to [a1,b1]x[a2,b2]
Definition: MATH_Integration.h:112
#define tBoolean
Definition: types.h:139
virtual ~MATH_Integration(void)
destroy an Integration Object.
Definition: MATH_Integration.h:56
void setSize(const tUIndex &n)
set the size
Definition: CORE_Array.h:292
#define null
Definition: types.h:144
void setBounds(const tUSInt &n, const tReal I[])
set the bounds of the domain of integration
Definition: MATH_Integration.cpp:3
virtual tReal integrate(SP::MATH_IntegrandFunction f)
integrate the function in the bounds of integration
Definition: MATH_Integration.h:205
const CORE_RealArray & getBounds() const
return the bounds of integration
Definition: MATH_Integration.h:175
virtual tReal integrate()=0
integrate the function in the bounds of integration
WP::MATH_IntegrandFunction mFunction
Definition: MATH_Integration.h:35
This class integrates integrand function MATH_IntegrandFunction where a,b,t,dt in d=(1...
Definition: MATH_Integration.h:19
abstract base class for most classes.
Definition: CORE_Object.h:53
tBoolean hasFunction() const
return true if the integrand is set
Definition: MATH_Integration.h:152
void setBounds(const tReal &a1, const tReal &b1, const tReal &a2, const tReal &b2, const tReal &a3, const tReal &b3)
set the integration domain to [a1,b1]x[a2,b2]x[a3,b3]
Definition: MATH_Integration.h:128
DEFINE_SPTR(MATH_IntegrandFunction)
This class describes a function to integrate. the method computeFunction() has to be defined...
Definition: MATH_IntegrandFunction.h:16
const MATH_IntegrandFunction & getFunction() const
get the integrand function
Definition: MATH_Integration.h:159
#define tReal
Definition: types.h:118
const tReal & getBound(const tUSInt &i) const
return the bound of the interval of integration
Definition: MATH_Integration.h:184
MATH_Integration(void)
create a Integration object
Definition: MATH_Integration.h:43
void copy(const CORE_Array< Q > &f)
copy the array
Definition: CORE_Array.hpp:16
CORE_RealArray mBounds
Definition: MATH_Integration.h:30