Skip to main content

Propagate

Trait Propagate 

Source
pub trait Propagate {
    // Required method
    fn propagate_into(
        &mut self,
        x: &Signal,
        rng: &mut SimRng,
        out: &mut Signal,
    ) -> Result<()>;

    // Provided method
    fn propagate(&mut self, x: &Signal, rng: &mut SimRng) -> Result<Signal> { ... }
}
Expand description

Propagation through a medium. Randomness is always explicit.

Required Methods§

Source

fn propagate_into( &mut self, x: &Signal, rng: &mut SimRng, out: &mut Signal, ) -> Result<()>

Propagate x into out, drawing the random numbers from rng.

§Errors

When the input does not fit the medium (empty signal, wrong number of streams).

Provided Methods§

Source

fn propagate(&mut self, x: &Signal, rng: &mut SimRng) -> Result<Signal>

Propagate x (allocates, calls Propagate::propagate_into).

§Errors

As Propagate::propagate_into.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§