public class ImportanceSampling extends Object implements MeanEstimator
| Constructor and Description |
|---|
ImportanceSampling(UnivariateRealFunction h,
UnivariateRealFunction w,
RandomNumberGenerator G)
Uses importance sample to do Monte Carlo integration.
|
public ImportanceSampling(UnivariateRealFunction h, UnivariateRealFunction w, RandomNumberGenerator G)
h - the function to integratew - the weight function or the change of measureG - a uniform random number generatorpublic Estimator estimate(int n)
MeanEstimatorestimate in interface MeanEstimatorn - the number of samples to draw for the estimationCopyright © 2010-2026 NM Group. All Rights Reserved.