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