// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _math_KronrodSingleIntegration_HeaderFile #define _math_KronrodSingleIntegration_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif class StdFail_NotDone; class math_Function; class math_Vector; //! This class implements the Gauss-Kronrod method of
//! integral computation.
class math_KronrodSingleIntegration { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! An empty constructor.
Standard_EXPORT math_KronrodSingleIntegration(); //! Constructor. Takes the function, the lower and upper bound
//! values, the initial number of Kronrod points
Standard_EXPORT math_KronrodSingleIntegration(math_Function& theFunction,const Standard_Real theLower,const Standard_Real theUpper,const Standard_Integer theNbPnts); //! Constructor. Takes the function, the lower and upper bound
//! values, the initial number of Kronrod points, the
//! tolerance value and the maximal number of iterations as
//! parameters.
Standard_EXPORT math_KronrodSingleIntegration(math_Function& theFunction,const Standard_Real theLower,const Standard_Real theUpper,const Standard_Integer theNbPnts,const Standard_Real theTolerance,const Standard_Integer theMaxNbIter); //! Computation of the integral. Takes the function,
//! the lower and upper bound values, the initial number
//! of Kronrod points, the relative tolerance value and the
//! maximal number of iterations as parameters.
//! theNbPnts should be odd and greater then or equal to 3.
Standard_EXPORT void Perform(math_Function& theFunction,const Standard_Real theLower,const Standard_Real theUpper,const Standard_Integer theNbPnts) ; //! Computation of the integral. Takes the function,
//! the lower and upper bound values, the initial number
//! of Kronrod points, the relative tolerance value and the
//! maximal number of iterations as parameters.
//! theNbPnts should be odd and greater then or equal to 3.
//! Note that theTolerance is relative, i.e. the criterion of
//! solution reaching is:
//! Abs(Kronrod - Gauss)/Abs(Kronrod) < theTolerance.
//! theTolerance should be positive.
Standard_EXPORT void Perform(math_Function& theFunction,const Standard_Real theLower,const Standard_Real theUpper,const Standard_Integer theNbPnts,const Standard_Real theTolerance,const Standard_Integer theMaxNbIter) ; //! Returns Standard_True if computation is performed
//! successfully.
Standard_Boolean IsDone() const; //! Returns the value of the integral.
Standard_Real Value() const; //! Returns the value of the relative error reached.
Standard_Real ErrorReached() const; //! Returns the value of the relative error reached.
Standard_Real AbsolutError() const; //! Returns the number of Kronrod points
//! for which the result is computed.
Standard_Integer OrderReached() const; //! Returns the number of iterations
//! that were made to compute result.
Standard_Integer NbIterReached() const; Standard_EXPORT static Standard_Boolean GKRule(math_Function& theFunction,const Standard_Real theLower,const Standard_Real theUpper,const math_Vector& theGaussP,const math_Vector& theGaussW,const math_Vector& theKronrodP,const math_Vector& theKronrodW,Standard_Real& theValue,Standard_Real& theError) ; protected: private: Standard_Boolean myIsDone; Standard_Real myValue; Standard_Real myErrorReached; Standard_Real myAbsolutError; Standard_Integer myNbPntsReached; Standard_Integer myNbIterReached; }; #include // other Inline functions and methods (like "C++: function call" methods) #endif