pub struct Realization {
pub couplings: Vec<f32>,
pub spins: Vec<i8>,
pub temperatures: Vec<f32>,
pub system_ids: Vec<usize>,
pub rngs: Vec<Xoshiro256StarStar>,
pub energies: Vec<f32>,
pub interactions: Vec<f32>,
}Expand description
Mutable state for one disorder realization.
Holds the coupling array (fixed after construction), spin configurations for every replica at every temperature, and bookkeeping for parallel tempering.
With n_replicas replicas and n_temps temperatures there are
n_systems = n_replicas * n_temps independent spin configurations.
Spins are stored in a single flat Vec of length n_systems * n_spins,
where system i occupies spins[i*n_spins .. (i+1)*n_spins].
Fields§
§couplings: Vec<f32>Forward couplings, length n_spins * n_dims.
spins: Vec<i8>All spin configurations, length n_systems * n_spins (+1/−1).
temperatures: Vec<f32>Temperature assigned to each system slot, length n_systems.
system_ids: Vec<usize>Parallel-tempering permutation: system_ids[slot] is the system index
currently occupying temperature slot slot.
rngs: Vec<Xoshiro256StarStar>One PRNG per system.
energies: Vec<f32>Cached total energy per system (E / N), length n_systems.
interactions: Vec<f32>Cached per-bond interactions (s_i * s_j * J_ij), length n_systems * n_spins * n_dims.
Implementations§
Auto Trait Implementations§
impl Freeze for Realization
impl RefUnwindSafe for Realization
impl Send for Realization
impl Sync for Realization
impl Unpin for Realization
impl UnsafeUnpin for Realization
impl UnwindSafe for Realization
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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