Constructor | Description |
---|---|
MetropolisHastings(Function f) |
Builds a sampler for the given function.
|
Modifier and Type | Method | Description |
---|---|---|
BigDecimal |
computeSample() |
Computes the next sample according to the Metropolis-Hastings algorithm.
|
BigDecimal |
getSample() |
Returns the next sample.
|
public MetropolisHastings(Function f)
f
- a PDF functionpublic BigDecimal getSample()
Sampler
public BigDecimal computeSample()
Copyright © 2018 STLAB. All rights reserved.