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§
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.
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.