Class Midpoint
- java.lang.Object
-
- dev.nm.analysis.integration.univariate.riemann.newtoncotes.NewtonCotes
-
- dev.nm.analysis.integration.univariate.riemann.newtoncotes.Midpoint
-
- All Implemented Interfaces:
Integrator
,IterativeIntegrator
public class Midpoint extends NewtonCotes
The midpoint rule computes an approximation to a definite integral, made by finding the area of a collection of rectangles whose heights are determined by the values of the function. Specifically, the interval over which the function is to be integrated is divided into equal subintervals of length. The rectangles are then drawn. The approximation to the integral is then calculated by adding up the areas (base multiplied by height) of the rectangles.- See Also:
- Wikipedia: Rectangle method
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class dev.nm.analysis.integration.univariate.riemann.newtoncotes.NewtonCotes
NewtonCotes.Type
-
-
Constructor Summary
Constructors Constructor Description Midpoint(double precision, int maxIterations)
Construct an integrator that implements the Midpoint rule.
-
Method Summary
-
Methods inherited from class dev.nm.analysis.integration.univariate.riemann.newtoncotes.NewtonCotes
getMaxIterations, getPrecision, h, integrate, next
-
-