pub struct Matrix {
pub rows: usize,
pub cols: usize,
pub data: Vec<u16>,
}Expand description
A row-major matrix over GF(2^16).
Fields§
§rows: usize§cols: usize§data: Vec<u16>Implementations§
Source§impl Matrix
impl Matrix
Sourcepub fn vandermonde_row(constants: &[u16], exponent: u32) -> Vec<u16>
pub fn vandermonde_row(constants: &[u16], exponent: u32) -> Vec<u16>
Compute a single row of the Vandermonde encoding matrix.
For constants [c0, c1, ..., cn-1] and exponent e, produces
the row [c0^e, c1^e, ..., cn-1^e].
Sourcepub fn gaussian_eliminate(&mut self, rhs: &mut Matrix) -> Result<()>
pub fn gaussian_eliminate(&mut self, rhs: &mut Matrix) -> Result<()>
Perform in-place Gaussian elimination over GF(2^16).
Transforms self into reduced row echelon form while applying the same
row operations to rhs. The matrix must be square.
After elimination, self will be the identity matrix (if invertible)
and rhs will contain the solution/inverse.
Trait Implementations§
impl Eq for Matrix
impl StructuralPartialEq for Matrix
Auto Trait Implementations§
impl Freeze for Matrix
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnsafeUnpin for Matrix
impl UnwindSafe for Matrix
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more