public class UnivariateMonteCarloIntegrator extends AbstractCloneableSerializable implements MonteCarloIntegrator<java.lang.Double>
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_VARIANCE
Default variance to add to the Gaussian, 0.0.
|
static UnivariateMonteCarloIntegrator |
INSTANCE
Default instance because this class has no state.
|
| Constructor and Description |
|---|
UnivariateMonteCarloIntegrator()
Creates a new instance of UnivariateMonteCarloIntegrator
|
| Modifier and Type | Method and Description |
|---|---|
UnivariateGaussian.PDF |
getMean(java.util.Collection<? extends java.lang.Double> samples)
Computes the Monte Carlo distribution of the given samples.
|
UnivariateGaussian.PDF |
getMean(java.util.List<? extends WeightedValue<? extends java.lang.Double>> samples)
Computes the Monte Carlo distribution of the given weighted samples.
|
<SampleType> |
integrate(java.util.Collection<? extends SampleType> samples,
Evaluator<? super SampleType,? extends java.lang.Double> expectationFunction)
Integrates the given function given samples from another function.
|
<SampleType> |
integrate(java.util.List<? extends WeightedValue<? extends SampleType>> samples,
Evaluator<? super SampleType,? extends java.lang.Double> expectationFunction)
Integrates the given function given weighted samples from another
function.
|
cloneequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclonepublic static final double DEFAULT_VARIANCE
public static final UnivariateMonteCarloIntegrator INSTANCE
public UnivariateMonteCarloIntegrator()
public <SampleType> UnivariateGaussian.PDF integrate(java.util.Collection<? extends SampleType> samples, Evaluator<? super SampleType,? extends java.lang.Double> expectationFunction)
MonteCarloIntegratorintegrate in interface MonteCarloIntegrator<java.lang.Double>SampleType - Type of samples to consider.samples - Samples from the underlying distribution.expectationFunction - Function for which to compute the expectation.public <SampleType> UnivariateGaussian.PDF integrate(java.util.List<? extends WeightedValue<? extends SampleType>> samples, Evaluator<? super SampleType,? extends java.lang.Double> expectationFunction)
MonteCarloIntegratorintegrate in interface MonteCarloIntegrator<java.lang.Double>SampleType - Type of samples to consider.samples - Weighted samples from the underlying distribution.expectationFunction - Function for which to compute the expectation.public UnivariateGaussian.PDF getMean(java.util.Collection<? extends java.lang.Double> samples)
MonteCarloIntegratorgetMean in interface MonteCarloIntegrator<java.lang.Double>samples - Samples to consider.public UnivariateGaussian.PDF getMean(java.util.List<? extends WeightedValue<? extends java.lang.Double>> samples)
MonteCarloIntegratorgetMean in interface MonteCarloIntegrator<java.lang.Double>samples - Weighted samples to consider.