Model

Trait Model 

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

    // 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

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.

Implementors§