Package edu.cmu.tetrad.util
Class Integrator
java.lang.Object
edu.cmu.tetrad.util.Integrator
Integrates under a function from one endpoint to another.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Method Summary
-
Method Details
-
getArea
Finds the area under function f between x1 and x2 using Simpson's rule. Divides the interval [x1, x2] into numIntervals subintervals.- Parameters:
f
- a Function object.x1
- the lower cutoffx2
- the upper cutoffnumIntervals
- the number of intervals to divide the interval [x1, x2] into for integrating.- Returns:
- the area.
-