Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
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.
 
 math_KronrodSingleIntegration (math_Function &theFunction, const double theLower, const double theUpper, const int theNbPnts)
 Constructor. Takes the function, the lower and upper bound values, the initial number of Kronrod points.
 
 math_KronrodSingleIntegration (math_Function &theFunction, const double theLower, const double theUpper, const int theNbPnts, const double theTolerance, const int 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.
 
void Perform (math_Function &theFunction, const double theLower, const double theUpper, const int 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 Perform (math_Function &theFunction, const double theLower, const double theUpper, const int theNbPnts, const double theTolerance, const int 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: std::abs(Kronrod - Gauss)/std::abs(Kronrod) < theTolerance. theTolerance should be positive.
 
bool IsDone () const
 Returns true if computation is performed successfully.
 
double Value () const
 Returns the value of the integral.
 
double ErrorReached () const
 Returns the value of the relative error reached.
 
double AbsolutError () const
 Returns the value of the relative error reached.
 
int OrderReached () const
 Returns the number of Kronrod points for which the result is computed.
 
int NbIterReached () const
 Returns the number of iterations that were made to compute result.
 

Static Public Member Functions

static bool GKRule (math_Function &theFunction, const double theLower, const double theUpper, const math_Vector &theGaussP, const math_Vector &theGaussW, const math_Vector &theKronrodP, const math_Vector &theKronrodW, double &theValue, double &theError)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ math_KronrodSingleIntegration() [1/3]

math_KronrodSingleIntegration::math_KronrodSingleIntegration ( )

An empty constructor.

◆ math_KronrodSingleIntegration() [2/3]

math_KronrodSingleIntegration::math_KronrodSingleIntegration ( math_Function & theFunction,
const double theLower,
const double theUpper,
const int theNbPnts )

Constructor. Takes the function, the lower and upper bound values, the initial number of Kronrod points.

◆ math_KronrodSingleIntegration() [3/3]

math_KronrodSingleIntegration::math_KronrodSingleIntegration ( math_Function & theFunction,
const double theLower,
const double theUpper,
const int theNbPnts,
const double theTolerance,
const int 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

◆ AbsolutError()

double math_KronrodSingleIntegration::AbsolutError ( ) const

Returns the value of the relative error reached.

◆ ErrorReached()

double math_KronrodSingleIntegration::ErrorReached ( ) const

Returns the value of the relative error reached.

◆ GKRule()

static bool math_KronrodSingleIntegration::GKRule ( math_Function & theFunction,
const double theLower,
const double theUpper,
const math_Vector & theGaussP,
const math_Vector & theGaussW,
const math_Vector & theKronrodP,
const math_Vector & theKronrodW,
double & theValue,
double & theError )
static

◆ IsDone()

bool math_KronrodSingleIntegration::IsDone ( ) const

Returns true if computation is performed successfully.

◆ NbIterReached()

int math_KronrodSingleIntegration::NbIterReached ( ) const

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

◆ OrderReached()

int math_KronrodSingleIntegration::OrderReached ( ) const

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

◆ Perform() [1/2]

void math_KronrodSingleIntegration::Perform ( math_Function & theFunction,
const double theLower,
const double theUpper,
const int 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.

◆ Perform() [2/2]

void math_KronrodSingleIntegration::Perform ( math_Function & theFunction,
const double theLower,
const double theUpper,
const int theNbPnts,
const double theTolerance,
const int 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: std::abs(Kronrod - Gauss)/std::abs(Kronrod) < theTolerance. theTolerance should be positive.

◆ Value()

double math_KronrodSingleIntegration::Value ( ) const

Returns the value of the integral.


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