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

pub trait DiagonalUpdater: OpContainer {
    pub 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)
;
pub 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>
; pub 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)
, { ... }
pub 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>
, { ... }
pub fn iterate_ps<F, T>(&self, pstart: usize, pend: usize, t: T, f: F) -> T
    where
        F: Fn(&Self, Option<&Self::Op>, T) -> T
, { ... }
pub fn iterate_ops<F, T>(&self, pstart: usize, pend: usize, t: T, f: F) -> T
    where
        F: Fn(&Self, &Self::Op, usize, T) -> T
, { ... }
pub fn make_diagonal_update<'b, H: Hamiltonian<'b>>(
        &mut self,
        cutoff: usize,
        beta: f64,
        state: &[bool],
        hamiltonian: &H
    ) { ... }
pub 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
    ) { ... }
pub 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
    ) { ... }
pub fn post_diagonal_update_hook(&mut self) { ... } }

Perform diagonal updates to an op container.

Required methods

pub 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)
[src]

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

pub 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>, 
[src]

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

Loading content...

Provided methods

pub 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)
[src]

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

pub 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>, 
[src]

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

pub fn iterate_ps<F, T>(&self, pstart: usize, pend: usize, t: T, f: F) -> T where
    F: Fn(&Self, Option<&Self::Op>, T) -> T, 
[src]

Iterate through the ops and call f.

pub fn iterate_ops<F, T>(&self, pstart: usize, pend: usize, t: T, f: F) -> T where
    F: Fn(&Self, &Self::Op, usize, T) -> T, 
[src]

Iterate through ops only. Calls try_iterate_ops by default.

pub fn make_diagonal_update<'b, H: Hamiltonian<'b>>(
    &mut self,
    cutoff: usize,
    beta: f64,
    state: &[bool],
    hamiltonian: &H
)
[src]

Perform a diagonal update step with thread rng.

pub 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
)
[src]

Perform a diagonal update step.

pub 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
)
[src]

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

pub fn post_diagonal_update_hook(&mut self)[src]

Called after an update.

Loading content...

Implementors

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

Loading content...