d01pa Method
関数リスト一覧   NagLibrary Namespaceへ  ライブラリイントロダクション  本ヘルプドキュメントのchm形式版

d01pa returns a sequence of approximations to the integral of a function over a multi-dimensional simplex, together with an error estimate for the last approximation.

Syntax

C#
public static void d01pa(
	int ndim,
	double[,] vert,
	D01..::.D01PA_FUNCTN functn,
	ref int minord,
	int maxord,
	double[] finvls,
	out double esterr,
	out int ifail
)
Visual Basic (Declaration)
Public Shared Sub d01pa ( _
	ndim As Integer, _
	vert As Double(,), _
	functn As D01..::.D01PA_FUNCTN, _
	ByRef minord As Integer, _
	maxord As Integer, _
	finvls As Double(), _
	<OutAttribute> ByRef esterr As Double, _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
static void d01pa(
	int ndim, 
	array<double,2>^ vert, 
	D01..::.D01PA_FUNCTN^ functn, 
	int% minord, 
	int maxord, 
	array<double>^ finvls, 
	[OutAttribute] double% esterr, 
	[OutAttribute] int% ifail
)
F#
static member d01pa : 
        ndim:int * 
        vert:float[,] * 
        functn:D01..::.D01PA_FUNCTN * 
        minord:int byref * 
        maxord:int * 
        finvls:float[] * 
        esterr:float byref * 
        ifail:int byref -> unit 

Parameters

ndim
Type: System..::.Int32
On entry: n, the number of dimensions of the integral.
Constraint: ndim2.
vert
Type: array< System..::.Double ,2>[,](,)[,]
An array of size [ldvert, sdvert]
Note: ldvert must satisfy the constraint: ldvertndim+1
Note: sdvert must satisfy the constraint: sdvert2×ndim+1
On entry: vert[i-1,j-1] must be set to the jth component of the ith vertex for the simplex integration region, for i=1,2,,n+1 and j=1,2,,n. If minord>0, vert must be unchanged since the previous call of d01pa.
On exit: these values are unchanged. The rest of the array vert is used for workspace and contains information to be used if another call of d01pa is made with minord>0. In particular vert[n,2n+1] contains the volume of the simplex.
functn
Type: NagLibrary..::.D01..::.D01PA_FUNCTN
functn must return the value of the integrand f at a given point.

A delegate of type D01PA_FUNCTN.

minord
Type: System..::.Int32 %
On entry: must specify the highest order of the approximations currently available in the array finvls. minord=0 indicates an initial call; minord>0 indicates that finvls[0],finvls[1],,finvls[minord-1] have already been computed in a previous call of d01pa.
Constraint: minord0.
On exit: minord=maxord.
maxord
Type: System..::.Int32
On entry: the highest order of approximation to the integral to be computed.
Constraint: maxord>minord.
finvls
Type: array< System..::.Double >[]()[]
An array of size [maxord]
On entry: if minord>0, finvls[0],finvls[1],,finvls[minord-1] must contain approximations to the integral previously computed by d01pa.
On exit: contains these values unchanged, and the newly computed values finvls[minord],finvls[minord+1],,finvls[maxord-1]. finvls[j-1] is an approximation to the integral of polynomial degree 2j-1.
esterr
Type: System..::.Double %
On exit: an absolute error estimate for finvls[maxord-1].
ifail
Type: System..::.Int32 %
On exit: ifail=0 unless the method detects an error (see [Error Indicators and Warnings]).

Description

d01pa computes a sequence of approximations finvls[j], for j=minord+1, minord+2,,maxord, to an integral
Sfx1,x2,,xndx1dx2dxn
where S is an n-dimensional simplex defined in terms of its n+1 vertices. finvls[j] is an approximation which will be exact (except for rounding errors) whenever the integrand is a polynomial of total degree 2j-1 or less.
The type of method used has been described in Grundmann and Moller (1978), and is implemented in an extrapolated form using the theory from de Doncker (1979).

References

Error Indicators and Warnings

Accuracy

Further Comments

The running time for d01pa will usually be dominated by the time used to evaluate the integrand functn. The maximum time that could be used by d01pa will be approximately given by
T×maxord+ndim! maxord-1!ndim+1!
where T is the time needed for one call of functn.

Example

See Also