pub trait CpuLogpFunc {
    type Err: Debug + Send + LogpError + 'static;

    fn logp(
        &mut self,
        position: &[f64],
        grad: &mut [f64]
    ) -> Result<f64, Self::Err>; fn dim(&self) -> usize; }
Expand description

Compute the unnormalized log probability density of the posterior

This needs to be implemnted by users of the library to define what distribution the users wants to sample from.

Errors during that computation can be recoverable or non-recoverable. If a non-recoverable error occurs during sampling, the sampler will stop and return an error.

Required Associated Types

Required Methods

Implementors