QagpIntegration Type

Adaptive integration with known singular points.

This class applies the adaptive integration algorithm QAGS taking account of the user-supplied locations of singular points. The array pts of length npts should contain the endpoints of the integration ranges defined by the integration region and locations of the singularities. For example, to integrate over the region (a, b) with break-points at x1, x2, x3 (where a < x1 < x2 < x3 < b) the following pts array should be used:

            pts[0] = a
            pts[1] = x1
            pts[2] = x2
            pts[3] = x3
            pts[4] = b
with npts = 5. If you know the locations of the singular points in the integration region then this routine will be faster than QAGS.

Ref.: Gnu Scientific library reference manual ()

Constructors

Constructor Description

QagpIntegration()

Full Usage: QagpIntegration()

Creates an instance of this integration class with a default integration rule and default debug flag setting.

QagpIntegration(debug)

Full Usage: QagpIntegration(debug)

Parameters:
    debug : bool - Setting of the debug flag for this instance. If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

Creates an instance of this integration class with a default integration rule and specified debug flag setting.

debug : bool

Setting of the debug flag for this instance. If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

QagpIntegration(integrationRule, debug)

Full Usage: QagpIntegration(integrationRule, debug)

Parameters:
    integrationRule : gsl_integration_rule - Integration rule used for integration.
    debug : bool - Setting of the debug flag for this instance. If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

Creates an instance of this integration class with specified integration rule and specified debug flag setting.

integrationRule : gsl_integration_rule

Integration rule used for integration.

debug : bool

Setting of the debug flag for this instance. If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

Instance members

Instance member Description

this.Integrate

Full Usage: this.Integrate

Parameters:
    f : Func<float, float> - Function to integrate.
    pts : float[] - Range of integration including the known singular points, see remarks here: QagpIntegration
    npts : int - Number of valid points in the array pts. Must be less or equal the size of the array pts.
    epsabs : float - Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.
    epsrel : float - Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.
    limit : int - Maximum number of subintervals used for integration.
    integrationRule : gsl_integration_rule - Integration rule used for integration (only for this function call).
    debug : bool - Setting of the debug flag (only for this function call). If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).
    result : byref<float> - On return, contains the integration result.
    abserr : byref<float> - On return, contains the absolute error of integration.

Returns: GSL_ERROR Null if successfull, otherwise the appropriate error code.

Adaptive integration with known singular points.

f : Func<float, float>

Function to integrate.

pts : float[]

Range of integration including the known singular points, see remarks here: QagpIntegration

npts : int

Number of valid points in the array pts. Must be less or equal the size of the array pts.

epsabs : float

Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.

epsrel : float

Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.

limit : int

Maximum number of subintervals used for integration.

integrationRule : gsl_integration_rule

Integration rule used for integration (only for this function call).

debug : bool

Setting of the debug flag (only for this function call). If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

result : byref<float>

On return, contains the integration result.

abserr : byref<float>

On return, contains the absolute error of integration.

Returns: GSL_ERROR

Null if successfull, otherwise the appropriate error code.

this.Integrate

Full Usage: this.Integrate

Parameters:
    f : Func<float, float> - Function to integrate.
    pts : float[] - Range of integration including the known singular points, see remarks here: QagpIntegration
    npts : int - Number of valid points in the array pts. Must be less or equal the size of the array pts.
    epsabs : float - Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.
    epsrel : float - Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.
    limit : int - Maximum number of subintervals used for integration.
    result : byref<float> - On return, contains the integration result.
    abserr : byref<float> - On return, contains the absolute error of integration.

Returns: GSL_ERROR Null if successfull, otherwise the appropriate error code.

Adaptive integration with known singular points using the integration rule and debug setting given in the constructor.

f : Func<float, float>

Function to integrate.

pts : float[]

Range of integration including the known singular points, see remarks here: QagpIntegration

npts : int

Number of valid points in the array pts. Must be less or equal the size of the array pts.

epsabs : float

Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.

epsrel : float

Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.

limit : int

Maximum number of subintervals used for integration.

result : byref<float>

On return, contains the integration result.

abserr : byref<float>

On return, contains the absolute error of integration.

Returns: GSL_ERROR

Null if successfull, otherwise the appropriate error code.

this.Integrate

Full Usage: this.Integrate

Parameters:
    f : Func<float, float> - Function to integrate.
    pts : float[] - Range of integration including the known singular points, see remarks here: QagpIntegration
    epsabs : float - Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.
    epsrel : float - Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.
    limit : int - Maximum number of subintervals used for integration.
    integrationRule : gsl_integration_rule - Integration rule used for integration (only for this function call).
    debug : bool - Setting of the debug flag (only for this function call). If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).
    result : byref<float> - On return, contains the integration result.
    abserr : byref<float> - On return, contains the absolute error of integration.

Returns: GSL_ERROR Null if successfull, otherwise the appropriate error code.

Adaptive integration with known singular points.

f : Func<float, float>

Function to integrate.

pts : float[]

Range of integration including the known singular points, see remarks here: QagpIntegration

epsabs : float

Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.

epsrel : float

Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.

limit : int

Maximum number of subintervals used for integration.

integrationRule : gsl_integration_rule

Integration rule used for integration (only for this function call).

debug : bool

Setting of the debug flag (only for this function call). If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

result : byref<float>

On return, contains the integration result.

abserr : byref<float>

On return, contains the absolute error of integration.

Returns: GSL_ERROR

Null if successfull, otherwise the appropriate error code.

this.Integrate

Full Usage: this.Integrate

Parameters:
    f : Func<float, float> - Function to integrate.
    pts : float[] - Range of integration including the known singular points, see remarks here: QagpIntegration
    epsabs : float - Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.
    epsrel : float - Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.
    limit : int - Maximum number of subintervals used for integration.
    result : byref<float> - On return, contains the integration result.
    abserr : byref<float> - On return, contains the absolute error of integration.

Returns: GSL_ERROR Null if successfull, otherwise the appropriate error code.

Adaptive integration with known singular points using the integration rule and debug setting given in the constructor.

f : Func<float, float>

Function to integrate.

pts : float[]

Range of integration including the known singular points, see remarks here: QagpIntegration

epsabs : float

Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.

epsrel : float

Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.

limit : int

Maximum number of subintervals used for integration.

result : byref<float>

On return, contains the integration result.

abserr : byref<float>

On return, contains the absolute error of integration.

Returns: GSL_ERROR

Null if successfull, otherwise the appropriate error code.

Static members

Static member Description

QagpIntegration.DefaultIntegrationRule

Full Usage: QagpIntegration.DefaultIntegrationRule

Returns: gsl_integration_rule

Returns the default integration rule used for this class.

Returns: gsl_integration_rule

QagpIntegration.Integration(f, pts, npts, epsabs, epsrel, limit, integrationRule, debug, result, abserr, tempStorage)

Full Usage: QagpIntegration.Integration(f, pts, npts, epsabs, epsrel, limit, integrationRule, debug, result, abserr, tempStorage)

Parameters:
    f : Func<float, float> - Function to integrate.
    pts : float[] - Range of integration including the known singular points, see remarks here: QagpIntegration
    npts : int - Number of valid points in the array pts. Must be less or equal the size of the array pts.
    epsabs : float - Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.
    epsrel : float - Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.
    limit : int - Maximum number of subintervals used for integration.
    integrationRule : gsl_integration_rule - Integration rule used for integration (only for this function call).
    debug : bool - Setting of the debug flag (only for this function call). If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).
    result : byref<float> - On return, contains the integration result.
    abserr : byref<float> - On return, contains the absolute error of integration.
    tempStorage : byref<obj> - Provides a temporary storage object that you can reuse for repeating function calls.

Returns: GSL_ERROR Null if successfull, otherwise the appropriate error code.

Adaptive integration with known singular points.

f : Func<float, float>

Function to integrate.

pts : float[]

Range of integration including the known singular points, see remarks here: QagpIntegration

npts : int

Number of valid points in the array pts. Must be less or equal the size of the array pts.

epsabs : float

Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.

epsrel : float

Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.

limit : int

Maximum number of subintervals used for integration.

integrationRule : gsl_integration_rule

Integration rule used for integration (only for this function call).

debug : bool

Setting of the debug flag (only for this function call). If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

result : byref<float>

On return, contains the integration result.

abserr : byref<float>

On return, contains the absolute error of integration.

tempStorage : byref<obj>

Provides a temporary storage object that you can reuse for repeating function calls.

Returns: GSL_ERROR

Null if successfull, otherwise the appropriate error code.

QagpIntegration.Integration(f, pts, npts, epsabs, epsrel, limit, result, abserr, tempStorage)

Full Usage: QagpIntegration.Integration(f, pts, npts, epsabs, epsrel, limit, result, abserr, tempStorage)

Parameters:
    f : Func<float, float> - Function to integrate.
    pts : float[] - Range of integration including the known singular points, see remarks here: QagpIntegration
    npts : int - Number of valid points in the array pts. Must be less or equal the size of the array pts.
    epsabs : float - Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.
    epsrel : float - Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.
    limit : int - Maximum number of subintervals used for integration.
    result : byref<float> - On return, contains the integration result.
    abserr : byref<float> - On return, contains the absolute error of integration.
    tempStorage : byref<obj> - Provides a temporary storage object that you can reuse for repeating function calls.

Returns: GSL_ERROR Null if successfull, otherwise the appropriate error code.

Adaptive integration with known singular points using default settings for integration rule and debugging.

f : Func<float, float>

Function to integrate.

pts : float[]

Range of integration including the known singular points, see remarks here: QagpIntegration

npts : int

Number of valid points in the array pts. Must be less or equal the size of the array pts.

epsabs : float

Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.

epsrel : float

Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.

limit : int

Maximum number of subintervals used for integration.

result : byref<float>

On return, contains the integration result.

abserr : byref<float>

On return, contains the absolute error of integration.

tempStorage : byref<obj>

Provides a temporary storage object that you can reuse for repeating function calls.

Returns: GSL_ERROR

Null if successfull, otherwise the appropriate error code.

QagpIntegration.Integration(f, pts, npts, epsabs, epsrel, limit, integrationRule, debug, result, abserr)

Full Usage: QagpIntegration.Integration(f, pts, npts, epsabs, epsrel, limit, integrationRule, debug, result, abserr)

Parameters:
    f : Func<float, float> - Function to integrate.
    pts : float[] - Range of integration including the known singular points, see remarks here: QagpIntegration
    npts : int - Number of valid points in the array pts. Must be less or equal the size of the array pts.
    epsabs : float - Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.
    epsrel : float - Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.
    limit : int - Maximum number of subintervals used for integration.
    integrationRule : gsl_integration_rule - Integration rule used for integration (only for this function call).
    debug : bool - Setting of the debug flag (only for this function call). If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).
    result : byref<float> - On return, contains the integration result.
    abserr : byref<float> - On return, contains the absolute error of integration.

Returns: GSL_ERROR Null if successfull, otherwise the appropriate error code.

Adaptive integration with known singular points.

f : Func<float, float>

Function to integrate.

pts : float[]

Range of integration including the known singular points, see remarks here: QagpIntegration

npts : int

Number of valid points in the array pts. Must be less or equal the size of the array pts.

epsabs : float

Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.

epsrel : float

Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.

limit : int

Maximum number of subintervals used for integration.

integrationRule : gsl_integration_rule

Integration rule used for integration (only for this function call).

debug : bool

Setting of the debug flag (only for this function call). If the integration fails or the specified accuracy is not reached, an exception is thrown if the debug flag is set to true. If set to false, the return value of the integration function will be set to the appropriate error code (an exception will be thrown then only for serious errors).

result : byref<float>

On return, contains the integration result.

abserr : byref<float>

On return, contains the absolute error of integration.

Returns: GSL_ERROR

Null if successfull, otherwise the appropriate error code.

QagpIntegration.Integration(f, pts, npts, epsabs, epsrel, limit, result, abserr)

Full Usage: QagpIntegration.Integration(f, pts, npts, epsabs, epsrel, limit, result, abserr)

Parameters:
    f : Func<float, float> - Function to integrate.
    pts : float[] - Range of integration including the known singular points, see remarks here: QagpIntegration
    npts : int - Number of valid points in the array pts. Must be less or equal the size of the array pts.
    epsabs : float - Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.
    epsrel : float - Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.
    limit : int - Maximum number of subintervals used for integration.
    result : byref<float> - On return, contains the integration result.
    abserr : byref<float> - On return, contains the absolute error of integration.

Returns: GSL_ERROR Null if successfull, otherwise the appropriate error code.

Adaptive integration with known singular points using default settings for integration rule and debugging.

f : Func<float, float>

Function to integrate.

pts : float[]

Range of integration including the known singular points, see remarks here: QagpIntegration

npts : int

Number of valid points in the array pts. Must be less or equal the size of the array pts.

epsabs : float

Specifies the expected absolute error of integration. Should be set to zero (0) if you specify a relative error.

epsrel : float

Specifies the expected relative error of integration. Should be set to zero (0) if you specify an absolute error.

limit : int

Maximum number of subintervals used for integration.

result : byref<float>

On return, contains the integration result.

abserr : byref<float>

On return, contains the absolute error of integration.

Returns: GSL_ERROR

Null if successfull, otherwise the appropriate error code.