Trait nuts_rs::Model

source ·
pub trait Model: Send + Sync + 'static {
    type Math<'model>: Math
       where Self: 'model;
    type DrawStorage<'model, S: Settings>: DrawStorage
       where Self: 'model;

    // Required methods
    fn new_trace<'model, S: Settings, R: Rng + ?Sized>(
        &'model self,
        rng: &mut R,
        chain_id: u64,
        settings: &'model S
    ) -> Result<Self::DrawStorage<'model, S>>;
    fn math(&self) -> Result<Self::Math<'_>>;
    fn init_position<R: Rng + ?Sized>(
        &self,
        rng: &mut R,
        position: &mut [f64]
    ) -> Result<()>;
}

Required Associated Types§

source

type Math<'model>: Math where Self: 'model

source

type DrawStorage<'model, S: Settings>: DrawStorage where Self: 'model

Required Methods§

source

fn new_trace<'model, S: Settings, R: Rng + ?Sized>( &'model self, rng: &mut R, chain_id: u64, settings: &'model S ) -> Result<Self::DrawStorage<'model, S>>

source

fn math(&self) -> Result<Self::Math<'_>>

source

fn init_position<R: Rng + ?Sized>( &self, rng: &mut R, position: &mut [f64] ) -> Result<()>

Object Safety§

This trait is not object safe.

Implementors§