pub trait Chain<M: Math>: SamplerStats<M> {
type AdaptStrategy: AdaptStrategy<M>;
// Required methods
fn set_position(&mut self, position: &[f64]) -> Result<()>;
fn draw(&mut self) -> Result<(Box<[f64]>, Progress)>;
fn dim(&self) -> usize;
}
Expand description
Draw samples from the posterior distribution using Hamiltonian MCMC.
Required Associated Types§
type AdaptStrategy: AdaptStrategy<M>
Required Methods§
Sourcefn set_position(&mut self, position: &[f64]) -> Result<()>
fn set_position(&mut self, position: &[f64]) -> Result<()>
Initialize the sampler to a position. This should be called before calling draw.
This fails if the logp function returns an error.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.