Model

Trait Model 

Source
pub trait Model: Send + Sync {
    type Params: Params;

    const SCALE: f64 = 2f64;

    // Required method
    fn log_prob(&self, state: &Self::Params) -> f64;
}
Expand description

Models are defined by the type of their parameters and their probability functions

Provided Associated Constants§

Source

const SCALE: f64 = 2f64

Scale parameter for stretch moves

Required Associated Types§

Source

type Params: Params

Type used to store the model parameters, e.g. [f64; N] or Vec<f64>

Required Methods§

Source

fn log_prob(&self, state: &Self::Params) -> f64

The logarithm of the probability determined by the model given the parameters stored in state, up to an addititive constant

The sampler will only ever consider differences of these values, i.e. any addititive constant that does not depend on state can be omitted when computing them.

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.

Implementors§