Package org.jreliability.evaluator
Class IntegralEvaluator
- java.lang.Object
-
- org.jreliability.evaluator.IntegralEvaluator
-
public class IntegralEvaluator extends java.lang.Object
TheIntegralEvaluator
determines the integral of aFunction
using Romberg's method.
-
-
Field Summary
Fields Modifier and Type Field Description protected double
epsilon
The allowed error /epsilon
for Romberg's method.
-
Constructor Summary
Constructors Constructor Description IntegralEvaluator()
Constructs theIntegralEvaluator
with the epsilon value1.0E-8
.IntegralEvaluator(double epsilon)
Constructs theIntegralEvaluator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
evaluate(Function f, double a, double b)
Calculates the integral froma
tob
.
-
-
-
Constructor Detail
-
IntegralEvaluator
public IntegralEvaluator()
Constructs theIntegralEvaluator
with the epsilon value1.0E-8
.
-
IntegralEvaluator
public IntegralEvaluator(double epsilon)
Constructs theIntegralEvaluator
.- Parameters:
epsilon
- the allowed error for Romberg's method.
-
-
Method Detail
-
evaluate
public double evaluate(Function f, double a, double b)
Calculates the integral froma
tob
.- Parameters:
f
- the function to be integrateda
- the lower boundb
- the upper bound- Returns:
- the value of the integral from
a
tob
-
-