Trait nuts_rs::Settings

source ·
pub trait Settings: Sealed + Clone + Copy + Default + Sync + Send + 'static {
    type Chain<M: Math>: Chain<M>;

    // Required methods
    fn new_chain<M: Math, R: Rng + ?Sized>(
        &self,
        chain: u64,
        math: M,
        rng: &mut R,
    ) -> Self::Chain<M>;
    fn sample_stats<M: Math>(
        &self,
        stats: &<Self::Chain<M> as SamplerStats<M>>::Stats,
    ) -> SampleStats;
    fn hint_num_tune(&self) -> usize;
    fn hint_num_draws(&self) -> usize;
    fn num_chains(&self) -> usize;
    fn seed(&self) -> u64;
}
Expand description

All sampler configurations implement this trait

Required Associated Types§

source

type Chain<M: Math>: Chain<M>

Required Methods§

source

fn new_chain<M: Math, R: Rng + ?Sized>( &self, chain: u64, math: M, rng: &mut R, ) -> Self::Chain<M>

source

fn sample_stats<M: Math>( &self, stats: &<Self::Chain<M> as SamplerStats<M>>::Stats, ) -> SampleStats

source

fn hint_num_tune(&self) -> usize

source

fn hint_num_draws(&self) -> usize

source

fn num_chains(&self) -> usize

source

fn seed(&self) -> u64

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Settings for DiagGradNutsSettings

§

type Chain<M: Math> = NutsChain<M, EuclideanPotential<M, DiagMassMatrix<M>>, SmallRng, GradDiagStrategy<M>>