[][src]Trait qmc::sse::qmc_traits::directed_loop::LoopUpdater

pub trait LoopUpdater: OpContainer + Factory<Vec<(usize, OpSide)>> + Factory<Vec<f64>> {
    type Node: OpNode<Self::Op>;
    pub fn get_node_ref(&self, p: usize) -> Option<&Self::Node>;
pub fn get_node_mut(&mut self, p: usize) -> Option<&mut Self::Node>;
pub fn get_first_p(&self) -> Option<usize>;
pub fn get_last_p(&self) -> Option<usize>;
pub fn get_first_p_for_var(&self, var: usize) -> Option<PRel>;
pub fn get_last_p_for_var(&self, var: usize) -> Option<PRel>;
pub fn get_previous_p(&self, node: &Self::Node) -> Option<usize>;
pub fn get_next_p(&self, node: &Self::Node) -> Option<usize>;
pub fn get_previous_p_for_rel_var(
        &self,
        relvar: usize,
        node: &Self::Node
    ) -> Option<PRel>;
pub fn get_next_p_for_rel_var(
        &self,
        relvar: usize,
        node: &Self::Node
    ) -> Option<PRel>; pub fn get_previous_p_for_var(
        &self,
        var: usize,
        node: &Self::Node
    ) -> Result<Option<PRel>, &str> { ... }
pub fn get_next_p_for_var(
        &self,
        var: usize,
        node: &Self::Node
    ) -> Result<Option<PRel>, &str> { ... }
pub fn get_nth_p(&self, n: usize) -> usize { ... }
pub fn does_var_have_ops(&self, var: usize) -> bool { ... }
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
, { ... }
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
, { ... }
pub fn post_loop_update_hook(&mut self) { ... } }

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.

Loading content...

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]

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]

Get the next p for a given var, takes the relative var index in node. Also returns the new relative var index.

Loading content...

Provided methods

pub fn get_previous_p_for_var(
    &self,
    var: usize,
    node: &Self::Node
) -> Result<Option<PRel>, &str>
[src]

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]

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]

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]

Make a loop update to the graph.

pub fn post_loop_update_hook(&mut self)[src]

Called after an update.

Loading content...

Implementors

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

type Node = FastOpNodeTemplate<O>

Loading content...