Trait qmc::sse::qmc_traits::directed_loop::LoopUpdater [−][src]
pub trait LoopUpdater: OpContainer + Factory<Vec<(usize, OpSide)>> + Factory<Vec<f64>> {
type Node: OpNode<Self::Op>;
Show 17 methods
fn get_node_ref(&self, p: usize) -> Option<&Self::Node>;
fn get_node_mut(&mut self, p: usize) -> Option<&mut Self::Node>;
fn get_first_p(&self) -> Option<usize>;
fn get_last_p(&self) -> Option<usize>;
fn get_first_p_for_var(&self, var: usize) -> Option<PRel>;
fn get_last_p_for_var(&self, var: usize) -> Option<PRel>;
fn get_previous_p(&self, node: &Self::Node) -> Option<usize>;
fn get_next_p(&self, node: &Self::Node) -> Option<usize>;
fn get_previous_p_for_rel_var(
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>;
fn get_next_p_for_rel_var(
&self,
relvar: usize,
node: &Self::Node
) -> Option<PRel>;
fn get_previous_p_for_var(
&self,
var: usize,
node: &Self::Node
) -> Result<Option<PRel>, &str> { ... }
fn get_next_p_for_var(
&self,
var: usize,
node: &Self::Node
) -> Result<Option<PRel>, &str> { ... }
fn get_nth_p(&self, n: usize) -> usize { ... }
fn does_var_have_ops(&self, var: usize) -> bool { ... }
fn make_loop_update<H>(
&mut self,
initial_n: Option<usize>,
hamiltonian: H,
state: &mut [bool]
)
where
H: Fn(&[usize], usize, &[bool], &[bool]) -> f64,
{ ... }
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,
{ ... }
fn post_loop_update_hook(&mut self) { ... }
}
Expand description
Add loop updates to OpContainer.
Associated Types
Required methods
fn get_node_ref(&self, p: usize) -> Option<&Self::Node>
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>
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>
fn get_first_p(&self) -> Option<usize>
Get the first occupied p if it exists.
fn get_last_p(&self) -> Option<usize>
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>
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>
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>
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>
fn get_next_p(&self, node: &Self::Node) -> Option<usize>
Get the next occupied p compared to node
.
Get the previous p for a given var, takes the relative var index in node. Also returns the new relative var index.
Provided methods
Get the previous p for a given var.
Get the next p for a given var.
fn does_var_have_ops(&self, var: usize) -> bool
fn does_var_have_ops(&self, var: usize) -> bool
Returns if a given variable is covered by any ops.
Make a loop update to the graph with thread rng.
Make a loop update to the graph.
fn post_loop_update_hook(&mut self)
fn post_loop_update_hook(&mut self)
Called after an update.