(agi.foundation.core-2022r2.jar)

• java.lang.Object

• ```public final class BurdenFairesAdaptiveQuadrature
extends Object```
An adaptive quadrature numerical integration utility based on Simpson's method.

See section 4.6 in "Numerical Analysis" by Burden and Faires for more information.

• ### Nested Class Summary

Nested Classes
Modifier and Type Class and Description
`static class ` `BurdenFairesAdaptiveQuadrature.Integrand`
The function to be integrated.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`static double` ```integrate(double intervalStart, double intervalEnd, double tolerance, int numberOfLevels, BurdenFairesAdaptiveQuadrature.Integrand integrand)```
Approximates the integral I = Int(f(x), a, b) to within a given tolerance.
`static boolean` ```tryIntegrate(double intervalStart, double intervalEnd, double tolerance, int numberOfLevels, BurdenFairesAdaptiveQuadrature.Integrand integrand, double[] integral)```
Approximates the integral I = Int(f(x), a, b) to within a given tolerance.
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Method Detail

• #### tryIntegrate

```public static boolean tryIntegrate(double intervalStart,
double intervalEnd,
double tolerance,
int numberOfLevels,
@Nonnull
@Nonnull
double[] integral)```
Approximates the integral I = Int(f(x), a, b) to within a given tolerance.
Parameters:
`intervalStart` - The start of the interval in which the function is integrated.
`intervalEnd` - The end of the interval in which the function is integrated.
`tolerance` - The error tolerance used in the adaptive quadrature technique.
`numberOfLevels` - The number of divisions.
`integrand` - The function to be integrated.
`integral` - The value of the integral.
Returns:
A boolean value indicating if the integral was successfully computed.
• #### integrate

```public static double integrate(double intervalStart,
double intervalEnd,
double tolerance,
int numberOfLevels,
@Nonnull
`intervalStart` - The start of the interval in which the function is integrated.
`intervalEnd` - The end of the interval in which the function is integrated.
`tolerance` - The error tolerance used in the adaptive quadrature technique. Note that this error is multiplied by 10.0 internally.
`numberOfLevels` - The number of divisions.
`integrand` - The function to be integrated.
`ArithmeticException` - Thrown when too many steps are taken.