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§
Required Methods§
Sourcefn log_prob(&self, state: &Self::Params) -> f64
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.