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

pub trait DiagonalUpdater: OpContainer {
    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)
; fn iterate_ps<F, T>(&self, t: T, f: F) -> T
    where
        F: Fn(&Self, Option<&Self::Op>, T) -> T
, { ... }
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)
, { ... }
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)
, { ... }
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)
, { ... }
fn post_diagonal_update_hook(&mut self) { ... } }

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)

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

Loading content...

Provided methods

fn iterate_ps<F, T>(&self, t: T, f: F) -> T where
    F: Fn(&Self, Option<&Self::Op>, T) -> T, 

Iterate through the ops and call f.

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)

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)

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)

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

fn post_diagonal_update_hook(&mut self)

Called after an update.

Loading content...

Implementors

impl DiagonalUpdater for SimpleOpDiagonal[src]

impl<O: Op + Clone> DiagonalUpdater for FastOpsTemplate<O>[src]

Loading content...