Struct RewlWalker

Source
pub struct RewlWalker<R, Hist, Energy, S, Res> { /* private fields */ }
Expand description

§Walker for Replica exchange Wang Landau

  • used by Rewl
  • performes the random walk in its respective domain

Implementations§

Source§

impl<R, Hist, Energy, S, Res> RewlWalker<R, Hist, Energy, S, Res>

Source

pub fn id(&self) -> usize

§Returns id of walker
  • important for mapping the ensemble to the walker
Source

pub fn wang_landau_mode(&self) -> WangLandauMode

§Which mode is this walker currently in?

see WangLandauMode

Source

pub fn energy(&self) -> &Energy

Returns reference of current energy

Source

pub fn energy_copy(&self) -> Energy
where Energy: Copy,

Returns current energy

Source

pub fn energy_clone(&self) -> Energy
where Energy: Clone,

Returns current energy

Source

pub fn hist(&self) -> &Hist

§Reference to internal histogram
Source

pub fn log_f(&self) -> f64

§Current (logarithm of) factor f
  • See the paper for more info
Source

pub fn sweep_size(&self) -> NonZeroUsize

§how many steps per sweep
Source

pub fn sweep_size_change(&mut self, sweep_size: NonZeroUsize)

§change how many steps per sweep are performed
Source

pub fn step_size(&self) -> usize

§step size for markov steps
Source

pub fn step_size_change(&mut self, step_size: usize)

§Change step sitze for markov steps
Source

pub fn step_count(&self) -> u64

§How many steps were performed until now?
Source

pub fn replica_exchanges(&self) -> usize

§How many successful replica exchanges were performed until now?
Source

pub fn proposed_replica_exchanges(&self) -> u64

§How many replica exchanges were proposed until now?
Source

pub fn replica_exchange_frac(&self) -> f64

fraction of how many replica exchanges were accepted and how many were proposed

Source

pub fn rejected_markov_steps(&self) -> u64

§How many markov steps were rejected until now
Source

pub fn acceptance_rate_markov(&self) -> f64

§rate/fraction of acceptance
Source

pub fn log_density(&self) -> &[f64]

Current non normalized estimate of the natural logarithm of the probability density function

Source§

impl<R, Hist, Energy, S, Res> RewlWalker<R, Hist, Energy, S, Res>
where R: Rng + Send + Sync, Self: Send + Sync, Hist: Histogram + HistogramVal<Energy>, Energy: Send + Sync, S: Send + Sync, Res: Send + Sync,

Source

pub fn log10_density(&self) -> Vec<f64>

§Current estimate of log10 of probability density
  • normalized (sum over non log values is 1 (within numerical precision))

Trait Implementations§

Source§

impl<R: Clone, Hist: Clone, Energy: Clone, S: Clone, Res: Clone> Clone for RewlWalker<R, Hist, Energy, S, Res>

Source§

fn clone(&self) -> RewlWalker<R, Hist, Energy, S, Res>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R: Debug, Hist: Debug, Energy: Debug, S: Debug, Res: Debug> Debug for RewlWalker<R, Hist, Energy, S, Res>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, R, Hist, Energy, S, Res> Deserialize<'de> for RewlWalker<R, Hist, Energy, S, Res>
where R: Deserialize<'de>, Hist: Deserialize<'de>, Energy: Deserialize<'de>, S: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<R, Hist, Energy, S, Res> From<RewlWalker<R, Hist, Energy, S, Res>> for ReesWalker<R, Hist, Energy, S, Res>
where Hist: Histogram,

Source§

fn from(rewl_walker: RewlWalker<R, Hist, Energy, S, Res>) -> Self

Converts to this type from the input type.
Source§

impl<R, Hist, Energy, S, Res> Serialize for RewlWalker<R, Hist, Energy, S, Res>
where R: Serialize, Hist: Serialize, Energy: Serialize, S: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<R, Hist, Energy, S, Res> Freeze for RewlWalker<R, Hist, Energy, S, Res>
where R: Freeze, Hist: Freeze, Energy: Freeze,

§

impl<R, Hist, Energy, S, Res> RefUnwindSafe for RewlWalker<R, Hist, Energy, S, Res>

§

impl<R, Hist, Energy, S, Res> Send for RewlWalker<R, Hist, Energy, S, Res>
where R: Send, Hist: Send, Energy: Send, Res: Send, S: Send,

§

impl<R, Hist, Energy, S, Res> Sync for RewlWalker<R, Hist, Energy, S, Res>
where R: Sync, Hist: Sync, Energy: Sync, Res: Sync, S: Sync,

§

impl<R, Hist, Energy, S, Res> Unpin for RewlWalker<R, Hist, Energy, S, Res>
where R: Unpin, Hist: Unpin, Energy: Unpin, Res: Unpin, S: Unpin,

§

impl<R, Hist, Energy, S, Res> UnwindSafe for RewlWalker<R, Hist, Energy, S, Res>
where R: UnwindSafe, Hist: UnwindSafe, Energy: UnwindSafe, Res: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,