[−][src]Struct m4ri_rust::friendly::BinMatrix
Structure to represent matrices
Methods
impl BinMatrix
[src]
pub fn zero(rows: usize, cols: usize) -> BinMatrix
[src]
Create a zero matrix
pub fn new(rows: Vec<BinVector>) -> BinMatrix
[src]
Create a new matrix
pub fn random(rows: usize, columns: usize) -> BinMatrix
[src]
pub fn from_mzd(mzd: *mut Mzd) -> BinMatrix
[src]
pub fn identity(rows: usize) -> BinMatrix
[src]
Get an identity matrix
pub fn augmented(&self, other: &BinMatrix) -> BinMatrix
[src]
Augment the matrix:
[A] [B] => [A B]
pub fn stacked(&self, other: &BinMatrix) -> BinMatrix
[src]
Stack the matrix with another and return the result
pub fn rank(&self) -> usize
[src]
Get the rank of the matrix
Does an echelonization and throws it away!
pub fn echelonize(&mut self) -> usize
[src]
Echelonize this matrix in-place
Return: the rank of the matrix
pub fn inverted(&self) -> BinMatrix
[src]
Compute the inverse of this matrix, returns a new matrix
pub fn transposed(&self) -> BinMatrix
[src]
Compute the transpose of the matrix
pub fn transpose(&self) -> BinMatrix
[src]
pub fn nrows(&self) -> usize
[src]
Get the number of rows
O(1)
pub fn ncols(&self) -> usize
[src]
Get the number of columns
O(1)
pub fn as_vector(&self) -> BinVector
[src]
Get as a vector
Works both on single-column and single-row matrices
pub fn bit(&self, row: usize, col: usize) -> bool
[src]
Get a certain bit
pub fn get_window(
&self,
start_row: usize,
start_col: usize,
high_row: usize,
high_col: usize
) -> BinMatrix
[src]
&self,
start_row: usize,
start_col: usize,
high_row: usize,
high_col: usize
) -> BinMatrix
Get a window from the matrix
pub fn set_window(
&mut self,
start_row: usize,
start_col: usize,
other: &BinMatrix
)
[src]
&mut self,
start_row: usize,
start_col: usize,
other: &BinMatrix
)
Set a window in the matrix to another matrix
Currently does bit-by-bit, should use more optimal means if alignment allows it
Trait Implementations
impl Drop for BinMatrix
[src]
impl Sync for BinMatrix
[src]
impl PartialEq<BinMatrix> for BinMatrix
[src]
fn eq(&self, other: &BinMatrix) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for BinMatrix
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for BinMatrix
[src]
impl Debug for BinMatrix
[src]
impl<'a> Add<&'a BinMatrix> for &'a BinMatrix
[src]
type Output = BinMatrix
The resulting type after applying the +
operator.
fn add(self, other: &BinMatrix) -> Self::Output
[src]
Add up two matrices
impl Add<BinMatrix> for BinMatrix
[src]
type Output = BinMatrix
The resulting type after applying the +
operator.
fn add(self, other: BinMatrix) -> Self::Output
[src]
Add up two matrices, re-uses memory of A
impl Mul<BinMatrix> for BinMatrix
[src]
type Output = BinMatrix
The resulting type after applying the *
operator.
fn mul(self, other: BinMatrix) -> Self::Output
[src]
Computes the product of two matrices
impl<'a> Mul<&'a BinMatrix> for &'a BinMatrix
[src]
type Output = BinMatrix
The resulting type after applying the *
operator.
fn mul(self, other: &BinMatrix) -> Self::Output
[src]
Computes the product of two matrices
impl<'a> Mul<&'a BinVector> for &'a BinMatrix
[src]
type Output = BinVector
The resulting type after applying the *
operator.
fn mul(self, other: &BinVector) -> Self::Output
[src]
Computes (A * v^T)
impl Mul<BinVector> for BinMatrix
[src]
type Output = BinVector
The resulting type after applying the *
operator.
fn mul(self, other: BinVector) -> Self::Output
[src]
Computes (A * v^T)
impl<'a> Mul<&'a BinMatrix> for &'a BinVector
[src]
type Output = BinVector
The resulting type after applying the *
operator.
fn mul(self, other: &BinMatrix) -> Self::Output
[src]
computes v^T * A
impl Mul<BinMatrix> for BinVector
[src]
type Output = BinVector
The resulting type after applying the *
operator.
fn mul(self, other: BinMatrix) -> Self::Output
[src]
computes v^T * A
impl AddAssign<BinMatrix> for BinMatrix
[src]
fn add_assign(&mut self, other: BinMatrix)
[src]
Add up two matrices, re-uses memory of A
impl<'a> AddAssign<&'a BinMatrix> for BinMatrix
[src]
fn add_assign(&mut self, other: &BinMatrix)
[src]
Add up two matrices, re-uses memory of A
Auto Trait Implementations
impl !Send for BinMatrix
impl Unpin for BinMatrix
impl UnwindSafe for BinMatrix
impl RefUnwindSafe for BinMatrix
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,