|
JMSLTM Numerical Library 3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.imsl.math.HyperRectangleQuadrature
HyperRectangleQuadrature integrates a function over a hypercube. This class is used to evaluate integrals of the form:
![]()
It is possible to improve on the performance of Monte Carlo by carefully choosing the points at which the function is to be evaluated. Randomly distributed points tend to be non-uniformly distributed. The alternative to a sequence of random points is a low-discrepancy sequence. A low-discrepancy sequence is one that is highly uniform.
This function is based on the low-discrepancy Faure sequence
as computed by FaureSequence.
| Nested Class Summary | |
static interface |
HyperRectangleQuadrature.Function
Public interface function for the HyperRectangleQuadrature class. |
| Constructor Summary | |
HyperRectangleQuadrature(int dim)
Constructs a HyperRectangleQuadrature object. |
|
HyperRectangleQuadrature(RandomSequence sequence)
Constructs a HyperRectangleQuadrature object. |
|
| Method Summary | |
double |
eval(HyperRectangleQuadrature.Function objectF)
Returns the value of the integral over the unit cube. |
double |
eval(HyperRectangleQuadrature.Function objectF,
double[] a,
double[] b)
Returns the value of the integral over a cube. |
double |
getErrorEstimate()
Returns an estimate of the relative error in the computed result. |
void |
setAbsoluteError(double errorAbsolute)
Sets the absolute error tolerance. |
void |
setRelativeError(double errorRelative)
Sets the relative error tolerance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HyperRectangleQuadrature(int dim)
public HyperRectangleQuadrature(RandomSequence sequence)
| Method Detail |
public void setAbsoluteError(double errorAbsolute)
errorAbsolute - a double scalar value specifying the
absolute errorpublic void setRelativeError(double errorRelative)
errorRelative - a double scalar value specifying the
relative errorpublic double getErrorEstimate()
double specifying an estimate of the relative
error in the computed resultpublic double eval(HyperRectangleQuadrature.Function objectF)
objectF - Function containing the function to be integrated
public double eval(HyperRectangleQuadrature.Function objectF,
double[] a,
double[] b)
objectF - Function containing the function to be integrateda - is a double specifying the lower limit of integration.
If null all of the lower limits default to 0.b - is a double specifying the upper limit of integration.
If null all of the upper limits default to 1.
|
JMSLTM Numerical Library 3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||