Params

Trait Params 

Source
pub trait Params:
    Send
    + Sync
    + Clone {
    // Required methods
    fn dimension(&self) -> usize;
    fn propose(&self, other: &Self, z: f64) -> Self;
}
Expand description

Model parameters defining the state space of the Markov chain

Required Methods§

Source

fn dimension(&self) -> usize

Dimension of the state space

This can depend on self in situations where the number of parameters depends on the data itself, e.g. the number of groups in a hierarchical model.

Source

fn propose(&self, other: &Self, z: f64) -> Self

Propose new parameters doing a stretch move based on the parameters other and the scale z

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.

Implementations on Foreign Types§

Source§

impl Params for Box<[f64]>

Model parameters stored as a boxed slice of length n considered as an element of the vector space R^n

Source§

fn dimension(&self) -> usize

Source§

fn propose(&self, other: &Self, z: f64) -> Self

Source§

impl Params for Vec<f64>

Model parameters stored as a vector of length n considered as an element of the vector space R^n

Source§

fn dimension(&self) -> usize

Source§

fn propose(&self, other: &Self, z: f64) -> Self

Source§

impl<const N: usize> Params for [f64; N]

Model parameters stored as an array of length N considered as an element of the vector space R^N

Source§

fn dimension(&self) -> usize

Source§

fn propose(&self, other: &Self, z: f64) -> Self

Implementors§