[−][src]Trait qmc::sse::qmc_traits::diagonal::DiagonalUpdater
Perform diagonal updates to an op container.
Required methods
fn mutate_ps<F, T>(&mut self, cutoff: usize, t: T, f: F) -> T where
F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T),
F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T),
Folds across the p values, passing T down. Mutates op if returned values is Some(...)
fn try_iterate_ps<F, T, V>(&self, t: T, f: F) -> Result<T, V> where
F: Fn(&Self, Option<&Self::Op>, T) -> Result<T, V>,
F: Fn(&Self, Option<&Self::Op>, T) -> Result<T, V>,
Iterate through the ops and call f. Exit early with Err(v).
Provided methods
fn mutate_ops<F, T>(&mut self, cutoff: usize, t: T, f: F) -> T where
F: Fn(&Self, &Self::Op, usize, T) -> (Option<Option<Self::Op>>, T),
F: Fn(&Self, &Self::Op, usize, T) -> (Option<Option<Self::Op>>, T),
Mutate only the ops.
fn try_iterate_ops<F, T, V>(&self, t: T, f: F) -> Result<T, V> where
F: Fn(&Self, &Self::Op, usize, T) -> Result<T, V>,
F: Fn(&Self, &Self::Op, usize, T) -> Result<T, V>,
Iterate through ops only.
fn iterate_ps<F, T>(&self, t: T, f: F) -> T where
F: Fn(&Self, Option<&Self::Op>, T) -> T,
F: Fn(&Self, Option<&Self::Op>, T) -> T,
Iterate through the ops and call f.
fn iterate_ops<F, T>(&self, t: T, f: F) -> T where
F: Fn(&Self, &Self::Op, usize, T) -> T,
F: Fn(&Self, &Self::Op, usize, T) -> T,
Iterate through ops only.
fn make_diagonal_update<'b, H, E>(
&mut self,
cutoff: usize,
beta: f64,
state: &[bool],
hamiltonian: &Hamiltonian<'b, H, E>
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
E: Fn(usize) -> (&'b [usize], bool),
&mut self,
cutoff: usize,
beta: f64,
state: &[bool],
hamiltonian: &Hamiltonian<'b, H, E>
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
E: Fn(usize) -> (&'b [usize], bool),
Perform a diagonal update step with thread rng.
fn make_diagonal_update_with_rng<'b, H, E, R: Rng>(
&mut self,
cutoff: usize,
beta: f64,
state: &[bool],
hamiltonian: &Hamiltonian<'b, H, E>,
rng: &mut R
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
E: Fn(usize) -> (&'b [usize], bool),
&mut self,
cutoff: usize,
beta: f64,
state: &[bool],
hamiltonian: &Hamiltonian<'b, H, E>,
rng: &mut R
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
E: Fn(usize) -> (&'b [usize], bool),
Perform a diagonal update step.
fn make_diagonal_update_with_rng_and_state_ref<'b, H, E, R: Rng>(
&mut self,
cutoff: usize,
beta: f64,
state: &mut [bool],
hamiltonian: &Hamiltonian<'b, H, E>,
rng: &mut R
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
E: Fn(usize) -> (&'b [usize], bool),
&mut self,
cutoff: usize,
beta: f64,
state: &mut [bool],
hamiltonian: &Hamiltonian<'b, H, E>,
rng: &mut R
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
E: Fn(usize) -> (&'b [usize], bool),
Perform a diagonal update step using in place edits to state.
fn post_diagonal_update_hook(&mut self)
Called after an update.
Implementors
impl<O: Op + Clone> DiagonalUpdater for FastOpsTemplate<O>
[src]
fn mutate_ps<F, T>(&mut self, cutoff: usize, t: T, f: F) -> T where
F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T),
[src]
F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T),
fn try_iterate_ps<F, T, V>(&self, t: T, f: F) -> Result<T, V> where
F: Fn(&Self, Option<&Self::Op>, T) -> Result<T, V>,
[src]
F: Fn(&Self, Option<&Self::Op>, T) -> Result<T, V>,
fn try_iterate_ops<F, T, V>(&self, t: T, f: F) -> Result<T, V> where
F: Fn(&Self, &Self::Op, usize, T) -> Result<T, V>,
[src]
F: Fn(&Self, &Self::Op, usize, T) -> Result<T, V>,
fn iterate_ps<F, T>(&self, t: T, f: F) -> T where
F: Fn(&Self, Option<&Self::Op>, T) -> T,
[src]
F: Fn(&Self, Option<&Self::Op>, T) -> T,
fn iterate_ops<F, T>(&self, t: T, f: F) -> T where
F: Fn(&Self, &Self::Op, usize, T) -> T,
[src]
F: Fn(&Self, &Self::Op, usize, T) -> T,