[−][src]Trait qmc::sse::qmc_traits::diagonal::DiagonalUpdater
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]
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(...)
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]
&self,
pstart: usize,
pend: usize,
t: T,
f: F
) -> Result<T, V> where
F: Fn(&Self, Option<&Self::Op>, T) -> Result<T, V>,
Iterate through the ops and call f. Exit early with Err(v).
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]
F: Fn(&Self, &Self::Op, usize, T) -> (Option<Option<Self::Op>>, T),
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]
&self,
pstart: usize,
pend: usize,
t: T,
f: F
) -> Result<T, V> where
F: Fn(&Self, &Self::Op, usize, T) -> Result<T, V>,
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]
F: Fn(&Self, Option<&Self::Op>, T) -> T,
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]
F: Fn(&Self, &Self::Op, usize, T) -> T,
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]
&mut self,
cutoff: usize,
beta: f64,
state: &[bool],
hamiltonian: &H
)
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]
&mut self,
cutoff: usize,
beta: f64,
state: &[bool],
hamiltonian: &H,
rng: &mut R
)
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]
&mut self,
cutoff: usize,
beta: f64,
state: &mut [bool],
hamiltonian: &H,
rng: &mut R
)
Perform a diagonal update step using in place edits to state.
pub fn post_diagonal_update_hook(&mut self)
[src]
Called after an update.
Implementors
impl<O: Op + Clone> DiagonalUpdater for FastOpsTemplate<O>
[src]
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]
F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T),
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]
F: Fn(&Self, &Self::Op, usize, 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>,
[src]
&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 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]
&self,
pstart: usize,
pend: usize,
t: T,
f: F
) -> Result<T, V> where
F: Fn(&Self, &Self::Op, usize, T) -> Result<T, V>,