[−][src]Trait qmc::sse::qmc_traits::directed_loop::LoopUpdater
Add loop updates to OpContainer.
Associated Types
type Node: OpNode<Self::Op>
The type used to contain the Op and handle movement around the worldlines.
Required methods
fn get_node_ref(&self, p: usize) -> Option<&Self::Node>
Get a ref to a node at position p
fn get_node_mut(&mut self, p: usize) -> Option<&mut Self::Node>
Get a mutable ref to the node at position p
fn get_first_p(&self) -> Option<usize>
Get the first occupied p if it exists.
fn get_last_p(&self) -> Option<usize>
Get the last occupied p if it exists.
fn get_first_p_for_var(&self, var: usize) -> Option<PRel>
Get the first p occupied which covers variable var
, also returns the relative index.
fn get_last_p_for_var(&self, var: usize) -> Option<PRel>
Get the last p occupied which covers variable var
, also returns the relative index.
fn get_previous_p(&self, node: &Self::Node) -> Option<usize>
Get the previous occupied p compared to node
.
fn get_next_p(&self, node: &Self::Node) -> Option<usize>
Get the next occupied p compared to node
.
fn get_previous_p_for_rel_var(
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>
Get the previous p for a given var, takes the relative var index in node. Also returns the new relative var index.
fn get_next_p_for_rel_var(
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>
Get the next p for a given var, takes the relative var index in node. Also returns the new relative var index.
Provided methods
fn get_previous_p_for_var(
&self,
var: usize,
node: &Self::Node
) -> Result<Option<PRel>, ()>
&self,
var: usize,
node: &Self::Node
) -> Result<Option<PRel>, ()>
Get the previous p for a given var.
fn get_next_p_for_var(
&self,
var: usize,
node: &Self::Node
) -> Result<Option<PRel>, ()>
&self,
var: usize,
node: &Self::Node
) -> Result<Option<PRel>, ()>
Get the next p for a given var.
fn get_nth_p(&self, n: usize) -> usize
Get the nth occupied p.
fn does_var_have_ops(&self, var: usize) -> bool
Returns if a given variable is covered by any ops.
fn make_loop_update<H>(
&mut self,
initial_n: Option<usize>,
hamiltonian: H,
state: &mut [bool]
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
&mut self,
initial_n: Option<usize>,
hamiltonian: H,
state: &mut [bool]
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
Make a loop update to the graph with thread rng.
fn make_loop_update_with_rng<H, R: Rng>(
&mut self,
initial_n: Option<usize>,
hamiltonian: H,
state: &mut [bool],
rng: &mut R
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
&mut self,
initial_n: Option<usize>,
hamiltonian: H,
state: &mut [bool],
rng: &mut R
) where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
Make a loop update to the graph.
fn post_loop_update_hook(&mut self)
Called after an update.
Implementors
impl<O: Op + Clone> LoopUpdater for FastOpsTemplate<O>
[src]
type Node = FastOpNodeTemplate<O>
fn get_node_ref(&self, p: usize) -> Option<&Self::Node>
[src]
fn get_node_mut(&mut self, p: usize) -> Option<&mut Self::Node>
[src]
fn get_first_p(&self) -> Option<usize>
[src]
fn get_last_p(&self) -> Option<usize>
[src]
fn get_first_p_for_var(&self, var: usize) -> Option<PRel>
[src]
fn get_last_p_for_var(&self, var: usize) -> Option<PRel>
[src]
fn get_previous_p(&self, node: &Self::Node) -> Option<usize>
[src]
fn get_next_p(&self, node: &Self::Node) -> Option<usize>
[src]
fn get_previous_p_for_rel_var(
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>
[src]
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>
fn get_next_p_for_rel_var(
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>
[src]
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>