public class MonteCarloIntegrator extends AbstractRealIntegral
Constructor and Description |
---|
MonteCarloIntegrator(double lowerBound,
double upperBound,
int numberOfEvaluationPoints)
Create an integrator using Simpson's rule.
|
MonteCarloIntegrator(double lowerBound,
double upperBound,
int numberOfEvaluationPoints,
boolean useParallelEvaluation)
Create an integrator using Simpson's rule.
|
Modifier and Type | Method and Description |
---|---|
double |
integrate(java.util.function.DoubleUnaryOperator integrand) |
getLowerBound, getUpperBound
public MonteCarloIntegrator(double lowerBound, double upperBound, int numberOfEvaluationPoints, boolean useParallelEvaluation)
lowerBound
- Lower bound of the integral.upperBound
- Upper bound of the integral.numberOfEvaluationPoints
- Maximum number of evaluation points to be used, must be greater or equal to 3.useParallelEvaluation
- If true, the integration rule will perform parallel evaluation of the integrand.public MonteCarloIntegrator(double lowerBound, double upperBound, int numberOfEvaluationPoints)
lowerBound
- Lower bound of the integral.upperBound
- Upper bound of the integral.numberOfEvaluationPoints
- Maximum number of evaluation points to be used.public double integrate(java.util.function.DoubleUnaryOperator integrand)
integrate
in interface RealIntegralInterface
integrate
in class AbstractRealIntegral
Copyright © 2017. All rights reserved.