pub struct PermutationView {
pub perm: Vec<usize>,
}Expand description
A permutation matrix view: row i has its one in column perm[i].
Fields§
§perm: Vec<usize>perm[i] is the column holding the one in row i.
Implementations§
Source§impl PermutationView
impl PermutationView
Sourcepub fn matvec<S: Semiring>(&self, v: &[S]) -> Result<Vec<S>, AlgebraError>
pub fn matvec<S: Semiring>(&self, v: &[S]) -> Result<Vec<S>, AlgebraError>
Apply to a vector: result[i] = v[perm[i]].
Sourcepub fn materialize<S: Semiring>(
&self,
limits: AlgebraLimits,
) -> Result<Matrix<S>, AlgebraError>
pub fn materialize<S: Semiring>( &self, limits: AlgebraLimits, ) -> Result<Matrix<S>, AlgebraError>
Materialize as a dense permutation matrix, guarded by limits.
Trait Implementations§
Source§impl Clone for PermutationView
impl Clone for PermutationView
Source§fn clone(&self) -> PermutationView
fn clone(&self) -> PermutationView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PermutationView
impl Debug for PermutationView
impl Eq for PermutationView
Source§impl PartialEq for PermutationView
impl PartialEq for PermutationView
impl StructuralPartialEq for PermutationView
Auto Trait Implementations§
impl Freeze for PermutationView
impl RefUnwindSafe for PermutationView
impl Send for PermutationView
impl Sync for PermutationView
impl Unpin for PermutationView
impl UnsafeUnpin for PermutationView
impl UnwindSafe for PermutationView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more