Trait qmc::sse::qmc_traits::diagonal::DiagonalUpdater[][src]

pub trait DiagonalUpdater: OpContainer {
    fn mutate_ps<F, T>(&mut self, pstart: usize, pend: usize, t: T, f: F) -> T
    where
        F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T)
;
fn try_iterate_ps<F, T, V>(
        &self,
        pstart: usize,
        pend: usize,
        t: T,
        f: F
    ) -> Result<T, V>
    where
        F: Fn(&Self, Option<&Self::Op>, T) -> Result<T, V>
; fn mutate_ops<F, T>(&mut self, pstart: usize, pend: usize, t: T, f: F) -> T
    where
        F: Fn(&Self, &Self::Op, usize, T) -> (Option<Option<Self::Op>>, T)
, { ... }
fn try_iterate_ops<F, T, V>(
        &self,
        pstart: usize,
        pend: usize,
        t: T,
        f: F
    ) -> Result<T, V>
    where
        F: Fn(&Self, &Self::Op, usize, T) -> Result<T, V>
, { ... }
fn iterate_ps<F, T>(&self, pstart: usize, pend: usize, t: T, f: F) -> T
    where
        F: Fn(&Self, Option<&Self::Op>, T) -> T
, { ... }
fn iterate_ops<F, T>(&self, pstart: usize, pend: usize, t: T, f: F) -> T
    where
        F: Fn(&Self, &Self::Op, usize, T) -> T
, { ... }
fn make_diagonal_update<'b, H: Hamiltonian<'b>>(
        &mut self,
        cutoff: usize,
        beta: f64,
        state: &[bool],
        hamiltonian: &H
    ) { ... }
fn make_diagonal_update_with_rng<'b, H: Hamiltonian<'b>, R: Rng>(
        &mut self,
        cutoff: usize,
        beta: f64,
        state: &[bool],
        hamiltonian: &H,
        rng: &mut R
    ) { ... }
fn make_diagonal_update_with_rng_and_state_ref<'b, H: Hamiltonian<'b>, R: Rng>(
        &mut self,
        cutoff: usize,
        beta: f64,
        state: &mut [bool],
        hamiltonian: &H,
        rng: &mut R
    ) { ... }
fn post_diagonal_update_hook(&mut self) { ... } }
Expand description

Perform diagonal updates to an op container.

Required methods

Folds across the p values, passing T down. Mutates op if returned values is Some(…)

Iterate through the ops and call f. Exit early with Err(v).

Provided methods

Mutate only the ops. Override with more efficient solutions if needed.

Iterate through ops only. Can override with more efficient implementation.

Iterate through the ops and call f.

Iterate through ops only. Calls try_iterate_ops by default.

Perform a diagonal update step with thread rng.

Perform a diagonal update step.

Perform a diagonal update step using in place edits to state.

Called after an update.

Implementors