Struct qmc::sse::qmc_traits::op_container::BasicOp [−][src]
pub struct BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug, { /* fields omitted */ }
Expand description
An standard op which covers a number of variables and changes the state from input to output.
Trait Implementations
impl<Vars: Clone, SubState: Clone> Clone for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]
impl<Vars: Clone, SubState: Clone> Clone for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]impl<Vars: Debug, SubState: Debug> Debug for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]
impl<Vars: Debug, SubState: Debug> Debug for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]impl<Vars, SubState> Op for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]
impl<Vars, SubState> Op for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]type Vars = Vars
type Vars = Vars
The list of op variables.
type SubState = SubState
type SubState = SubState
The list of op input and output states.
fn diagonal<A, B>(vars: A, bond: usize, state: B, constant: bool) -> Self where
A: Into<Self::Vars>,
B: Into<Self::SubState>,
[src]
fn diagonal<A, B>(vars: A, bond: usize, state: B, constant: bool) -> Self where
A: Into<Self::Vars>,
B: Into<Self::SubState>,
[src]Make a diagonal op.
fn offdiagonal<A, B, C>(
vars: A,
bond: usize,
inputs: B,
outputs: C,
constant: bool
) -> Self where
A: Into<Self::Vars>,
B: Into<Self::SubState>,
C: Into<Self::SubState>,
[src]
fn offdiagonal<A, B, C>(
vars: A,
bond: usize,
inputs: B,
outputs: C,
constant: bool
) -> Self where
A: Into<Self::Vars>,
B: Into<Self::SubState>,
C: Into<Self::SubState>,
[src]Make an offdiagonal op.
fn is_diagonal(&self) -> bool
[src]
fn is_diagonal(&self) -> bool
[src]Check if the op is diagonal (makes no state changes).
fn index_of_var(&self, var: usize) -> Option<usize>
[src]
fn index_of_var(&self, var: usize) -> Option<usize>
[src]Get the relative index of a variable.
fn get_inputs(&self) -> &[bool]
[src]
fn get_inputs(&self) -> &[bool]
[src]Get the input state for the op.
fn get_outputs(&self) -> &[bool]
[src]
fn get_outputs(&self) -> &[bool]
[src]Get the output state for the op.
fn clone_and_edit_in_out<F>(&self, f: F) -> Self where
F: Fn(&mut [bool], &mut [bool]),
[src]
fn clone_and_edit_in_out<F>(&self, f: F) -> Self where
F: Fn(&mut [bool], &mut [bool]),
[src]Clone the op and edit inputs and outputs.
fn clone_and_edit_in_out_symmetric<F>(&self, f: F) -> Self where
F: Fn(&mut [bool]),
[src]
fn clone_and_edit_in_out_symmetric<F>(&self, f: F) -> Self where
F: Fn(&mut [bool]),
[src]Clone the op and edit inputs and outputs. Must edit states symmetrically (diagonal stays diagonal, offdiagonal stays offdiagonal). Read more
fn clone_inputs(&self) -> Self::SubState
[src]
fn clone_inputs(&self) -> Self::SubState
[src]Get the input state for the op.
fn clone_outputs(&self) -> Self::SubState
[src]
fn clone_outputs(&self) -> Self::SubState
[src]Get the output state for the op.
fn is_constant(&self) -> bool
[src]
fn is_constant(&self) -> bool
[src]If the op is always a constant under any bit flip in input or output, then it can be used to mark the edges of clusters. Read more
fn edit_in_out<F>(&mut self, f: F) where
F: Fn(&mut [bool], &mut [bool]),
[src]
fn edit_in_out<F>(&mut self, f: F) where
F: Fn(&mut [bool], &mut [bool]),
[src]Edit inputs and outputs.
fn edit_in_out_symmetric<F>(&mut self, f: F) where
F: Fn(&mut [bool]),
[src]
fn edit_in_out_symmetric<F>(&mut self, f: F) where
F: Fn(&mut [bool]),
[src]Edit inputs and outputs. Must edit states symmetrically (diagonal stays diagonal, offdiagonal stays offdiagonal). Read more
fn make_vars<V>(vars: V) -> Self::Vars where
V: IntoIterator<Item = usize>,
[src]
fn make_vars<V>(vars: V) -> Self::Vars where
V: IntoIterator<Item = usize>,
[src]Make vars (this is here mostly due to rust bug 38078)
fn make_substate<S>(state: S) -> Self::SubState where
S: IntoIterator<Item = bool>,
[src]
fn make_substate<S>(state: S) -> Self::SubState where
S: IntoIterator<Item = bool>,
[src]Make substate (this is here mostly due to rust bug 38078)
impl<Vars: PartialEq, SubState: PartialEq> PartialEq<BasicOp<Vars, SubState>> for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]
impl<Vars: PartialEq, SubState: PartialEq> PartialEq<BasicOp<Vars, SubState>> for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]impl<Vars: Eq, SubState: Eq> Eq for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
impl<Vars, SubState> StructuralEq for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
impl<Vars, SubState> StructuralPartialEq for BasicOp<Vars, SubState> where
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
[src]
Vars: FromIterator<usize> + AsRef<[usize]> + AsMut<[usize]> + Clone + Debug,
SubState: FromIterator<bool> + AsRef<[bool]> + AsMut<[bool]> + Clone + Debug,
Auto Trait Implementations
impl<Vars, SubState> RefUnwindSafe for BasicOp<Vars, SubState> where
SubState: RefUnwindSafe,
Vars: RefUnwindSafe,
SubState: RefUnwindSafe,
Vars: RefUnwindSafe,
impl<Vars, SubState> Send for BasicOp<Vars, SubState> where
SubState: Send,
Vars: Send,
SubState: Send,
Vars: Send,
impl<Vars, SubState> Sync for BasicOp<Vars, SubState> where
SubState: Sync,
Vars: Sync,
SubState: Sync,
Vars: Sync,
impl<Vars, SubState> Unpin for BasicOp<Vars, SubState> where
SubState: Unpin,
Vars: Unpin,
SubState: Unpin,
Vars: Unpin,
impl<Vars, SubState> UnwindSafe for BasicOp<Vars, SubState> where
SubState: UnwindSafe,
Vars: UnwindSafe,
SubState: UnwindSafe,
Vars: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,