Trait WangLandauEnsemble

Source
pub trait WangLandauEnsemble<E>: WangLandau {
    // 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

§mutable reference to current state
  • Intended for usecases where mutable access allows for a much more efficient calculation of your calculations
§Safety

*you should not make any changes, that effect the ‘energy’ state of the system. otherwise the WangLandau simulations will give false results!

  • Note that I only use the unsafe keyword to force the user to acknowledge the above

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> WangLandauEnsemble<E> for WangLandau1T<Hist, R, E, S, Res, Energy>

Source§

impl<R, E, S, Res, Hist, T> WangLandauEnsemble<E> for WangLandauAdaptive<Hist, R, E, S, Res, T>