[][src]Trait qmc::sse::qmc_traits::DiagonalSubsection

pub trait DiagonalSubsection: OpContainer + LoopUpdater + DiagonalUpdater {
    type Args: MutateArgs;
    pub fn mutate_p<T, F>(
        &mut self,
        f: F,
        p: usize,
        t: T,
        args: Self::Args
    ) -> (T, Self::Args)
    where
        F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T)
;
pub fn mutate_subsection<T, F>(
        &mut self,
        pstart: usize,
        pend: usize,
        t: T,
        f: F,
        args: Option<Self::Args>
    ) -> T
    where
        F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T)
;
pub fn get_empty_args(
        &mut self,
        vars: SubvarAccess<'_, Self::Args>
    ) -> Self::Args;
pub fn fill_args_at_p(&self, p: usize, empty_args: Self::Args) -> Self::Args;
pub fn fill_args_at_p_with_hint<It>(
        &self,
        p: usize,
        args: &mut Self::Args,
        vars: &[usize],
        hint: It
    )
    where
        It: IntoIterator<Item = Option<usize>>
;
pub fn return_args(&mut self, args: Self::Args);
pub fn get_propagated_substate_with_hint<It>(
        &self,
        p: usize,
        substate: &mut [bool],
        state: &[bool],
        vars: &[usize],
        hint: It
    )
    where
        It: IntoIterator<Item = Option<usize>>
; pub fn mutate_subsection_ops<T, F>(
        &mut self,
        pstart: usize,
        pend: usize,
        t: T,
        f: F,
        args: Option<Self::Args>
    ) -> T
    where
        F: Fn(&Self, &Self::Op, usize, T) -> (Option<Option<Self::Op>>, T)
, { ... }
pub fn iter_ops_above_p<T, F, G>(
        &self,
        p: usize,
        t: T,
        f: F,
        f_at_p: G
    ) -> T
    where
        F: Fn(usize, &Self::Node, T) -> (T, bool),
        G: Fn(&Self::Node, T) -> (T, bool)
, { ... } }

Allows for mutations on subsections of the data.

Associated Types

type Args: MutateArgs[src]

The type required for mutating p values.

Loading content...

Required methods

pub fn mutate_p<T, F>(
    &mut self,
    f: F,
    p: usize,
    t: T,
    args: Self::Args
) -> (T, Self::Args) where
    F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T)
[src]

Mutate a single p value.

pub fn mutate_subsection<T, F>(
    &mut self,
    pstart: usize,
    pend: usize,
    t: T,
    f: F,
    args: Option<Self::Args>
) -> T where
    F: Fn(&Self, Option<&Self::Op>, T) -> (Option<Option<Self::Op>>, T)
[src]

Mutate using a restricted prange and args. Allows for running on smaller subsections of the variables.

pub fn get_empty_args(
    &mut self,
    vars: SubvarAccess<'_, Self::Args>
) -> Self::Args
[src]

Get empty args for a subsection of variables, or from an existing set of args (does not clear).

pub fn fill_args_at_p(&self, p: usize, empty_args: Self::Args) -> Self::Args[src]

Get the args required for mutation.

pub fn fill_args_at_p_with_hint<It>(
    &self,
    p: usize,
    args: &mut Self::Args,
    vars: &[usize],
    hint: It
) where
    It: IntoIterator<Item = Option<usize>>, 
[src]

Use a list of ps to make args. Hint provides up to one ps per var in order.

pub fn return_args(&mut self, args: Self::Args)[src]

Returns arg made for the mutation

pub fn get_propagated_substate_with_hint<It>(
    &self,
    p: usize,
    substate: &mut [bool],
    state: &[bool],
    vars: &[usize],
    hint: It
) where
    It: IntoIterator<Item = Option<usize>>, 
[src]

Get the substate at p using ps to set values. Hint provides up to one ps per var in order. substate should start in p=0 configuration.

Loading content...

Provided methods

pub fn mutate_subsection_ops<T, F>(
    &mut self,
    pstart: usize,
    pend: usize,
    t: T,
    f: F,
    args: Option<Self::Args>
) -> T where
    F: Fn(&Self, &Self::Op, usize, T) -> (Option<Option<Self::Op>>, T)
[src]

Mutate ops using a restricted prange and args. Allows for running on smaller subsections of the variables.

pub fn iter_ops_above_p<T, F, G>(&self, p: usize, t: T, f: F, f_at_p: G) -> T where
    F: Fn(usize, &Self::Node, T) -> (T, bool),
    G: Fn(&Self::Node, T) -> (T, bool)
[src]

Iterate over ops at indices less than or equal to p. Applies function f_at_p only to the op at p. Applies f to all other ops above p.

Loading content...

Implementors

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

type Args = FastOpMutateArgs

Loading content...