Open CASCADE Technology  6.9.0
Public Member Functions | Static Public Member Functions
math_KronrodSingleIntegration Class Reference

This class implements the Gauss-Kronrod method of integral computation. More...

#include <math_KronrodSingleIntegration.hxx>

Public Member Functions

 math_KronrodSingleIntegration ()
 An empty constructor. More...
 
 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. More...
 
 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)
 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. More...
 
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. More...
 
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)
 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. More...
 
Standard_Boolean IsDone () const
 Returns Standard_True if computation is performed successfully. More...
 
Standard_Real Value () const
 Returns the value of the integral. More...
 
Standard_Real ErrorReached () const
 Returns the value of the relative error reached. More...
 
Standard_Real AbsolutError () const
 Returns the value of the relative error reached. More...
 
Standard_Integer OrderReached () const
 Returns the number of Kronrod points for which the result is computed. More...
 
Standard_Integer NbIterReached () const
 Returns the number of iterations that were made to compute result. More...
 

Static Public Member Functions

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)
 

Detailed Description

This class implements the Gauss-Kronrod method of integral computation.

Constructor & Destructor Documentation

math_KronrodSingleIntegration::math_KronrodSingleIntegration ( )

An empty constructor.

math_KronrodSingleIntegration::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.

math_KronrodSingleIntegration::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 
)

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.

Member Function Documentation

Standard_Real math_KronrodSingleIntegration::AbsolutError ( ) const

Returns the value of the relative error reached.

Standard_Real math_KronrodSingleIntegration::ErrorReached ( ) const

Returns the value of the relative error reached.

static Standard_Boolean math_KronrodSingleIntegration::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 
)
static
Standard_Boolean math_KronrodSingleIntegration::IsDone ( ) const

Returns Standard_True if computation is performed successfully.

Standard_Integer math_KronrodSingleIntegration::NbIterReached ( ) const

Returns the number of iterations that were made to compute result.

Standard_Integer math_KronrodSingleIntegration::OrderReached ( ) const

Returns the number of Kronrod points for which the result is computed.

void math_KronrodSingleIntegration::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.

void math_KronrodSingleIntegration::Perform ( 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. Note that theTolerance is relative, i.e. the criterion of solution reaching is: Abs(Kronrod - Gauss)/Abs(Kronrod) < theTolerance. theTolerance should be positive.

Standard_Real math_KronrodSingleIntegration::Value ( ) const

Returns the value of the integral.


The documentation for this class was generated from the following file: