public abstract class MonteCarloIntegration extends Object
Constructor and Description |
---|
MonteCarloIntegration(RandomSource source,
int dimension)
Simulation constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
integrate(long n)
Run the Monte-Carlo integration.
|
protected abstract boolean |
isInside(double... point)
Indicates whether the given points is inside the region whose
integral is computed.
|
public MonteCarloIntegration(RandomSource source, int dimension)
source
- RNG algorithm.dimension
- Integration domain dimension.public double integrate(long n)
n
- Number of random points to generate.protected abstract boolean isInside(double... point)
point
- Point whose coordinates are random numbers uniformly
distributed in the unit interval.true
if the point
is inside.Copyright © 2016 The Apache Software Foundation. All rights reserved.