Trait EntropicEnsemble

Source
pub trait EntropicEnsemble<E>: Entropic {
    // Required methods
    fn ensemble(&self) -> &E;
    unsafe fn ensemble_mut(&mut self) -> &mut E;
}
Expand description

§trait to request a reference to the current (state of the) ensemble

Required Methods§

Source

fn ensemble(&self) -> &E

return reference to current state of ensemble

Source

unsafe fn ensemble_mut(&mut self) -> &mut E

§returns mutable reference to ensemble
§Safety
  • If, whatever you do with the ensemble, changes the energy of the current state, you cannot trust the results of entropic sampling anymore
  • use with care

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.

Implementors§

Source§

impl<Hist, R, E, S, Res, Energy> EntropicEnsemble<E> for EntropicSampling<Hist, R, E, S, Res, Energy>
where Hist: Histogram, R: Rng,

Source§

impl<Hist, R, E, S, Res, Energy> EntropicEnsemble<E> for EntropicSamplingAdaptive<Hist, R, E, S, Res, Energy>
where Hist: Histogram, R: Rng,