Struct Mat

Source
pub struct Mat<T, NROWS, NCOLS>
where NROWS: Mul<NCOLS>, Prod<NROWS, NCOLS>: ArrayLength<T>,
{ /* private fields */ }
Expand description

Statically allocated (row major order) matrix

Trait Implementations§

Source§

impl<T: Clone, NROWS, NCOLS: Clone> Clone for Mat<T, NROWS, NCOLS>
where NROWS: Mul<NCOLS> + Clone, Prod<NROWS, NCOLS>: ArrayLength<T>,

Source§

fn clone(&self) -> Mat<T, NROWS, NCOLS>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, NROWS, NCOLS> Debug for Mat<T, NROWS, NCOLS>
where NROWS: Mul<NCOLS>, NCOLS: Unsigned, Prod<NROWS, NCOLS>: ArrayLength<T>, T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, NROWS, NCOLS> Index<usize> for Mat<T, NROWS, NCOLS>
where NROWS: Mul<NCOLS> + Unsigned, NCOLS: ArrayLength<T> + Unsigned, Prod<NROWS, NCOLS>: ArrayLength<T>,

Source§

type Output = Row<T, NCOLS>

The returned type after indexing.
Source§

fn index(&self, r: usize) -> &Row<T, NCOLS>

Performs the indexing (container[index]) operation. Read more
Source§

impl<T, NROWS, NCOLS> IndexMut<usize> for Mat<T, NROWS, NCOLS>
where NROWS: Mul<NCOLS> + Unsigned, NCOLS: ArrayLength<T> + Unsigned, Prod<NROWS, NCOLS>: ArrayLength<T>,

Source§

fn index_mut(&mut self, r: usize) -> &mut Row<T, NCOLS>

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, T, NROWS, NCOLS> Matrix for &'a Mat<T, NROWS, NCOLS>
where NROWS: Mul<NCOLS> + Unsigned, NCOLS: Unsigned, Prod<NROWS, NCOLS>: ArrayLength<T>, T: Copy,

Source§

type NROWS = NROWS

Number of rows
Source§

type NCOLS = NCOLS

Number of columns
Source§

fn get(self, r: usize, c: usize) -> Self::Elem

Returns the element at row r and column c Read more
Source§

fn size(self) -> (usize, usize)

Returns the size of the matrix
Source§

fn nrows(self) -> usize

Returns the number of rows of the matrix
Source§

fn ncols(self) -> usize

Returns the number of columns of the matrix
Source§

impl<'a, T, NROWS, NCOLS, R> Mul<R> for &'a Mat<T, NROWS, NCOLS>
where NROWS: Mul<NCOLS>, NCOLS: Unsigned, Prod<NROWS, NCOLS>: ArrayLength<T>, R: Matrix<NROWS = NCOLS>,

Source§

type Output = Product<&'a Mat<T, NROWS, NCOLS>, R>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: R) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, T, NROWS, NCOLS> UnsafeGet for &'a Mat<T, NROWS, NCOLS>
where NROWS: Mul<NCOLS> + Unsigned, NCOLS: Unsigned, Prod<NROWS, NCOLS>: ArrayLength<T>, T: Copy,

Source§

type Elem = T

The matrix element type
Source§

unsafe fn unsafe_get(self, r: usize, c: usize) -> T

Returns the element at row r and column c with performing bounds checks

Auto Trait Implementations§

§

impl<T, NROWS, NCOLS> Freeze for Mat<T, NROWS, NCOLS>
where <NROWS as Mul<NCOLS>>::Output: Sized, <<NROWS as Mul<NCOLS>>::Output as ArrayLength<T>>::ArrayType: Freeze,

§

impl<T, NROWS, NCOLS> RefUnwindSafe for Mat<T, NROWS, NCOLS>
where <NROWS as Mul<NCOLS>>::Output: Sized, <<NROWS as Mul<NCOLS>>::Output as ArrayLength<T>>::ArrayType: RefUnwindSafe, NROWS: RefUnwindSafe, NCOLS: RefUnwindSafe,

§

impl<T, NROWS, NCOLS> Send for Mat<T, NROWS, NCOLS>
where <NROWS as Mul<NCOLS>>::Output: Sized, T: Send, NROWS: Send, NCOLS: Send,

§

impl<T, NROWS, NCOLS> Sync for Mat<T, NROWS, NCOLS>
where <NROWS as Mul<NCOLS>>::Output: Sized, T: Sync, NROWS: Sync, NCOLS: Sync,

§

impl<T, NROWS, NCOLS> Unpin for Mat<T, NROWS, NCOLS>
where <NROWS as Mul<NCOLS>>::Output: Sized, <<NROWS as Mul<NCOLS>>::Output as ArrayLength<T>>::ArrayType: Unpin, NROWS: Unpin, NCOLS: Unpin,

§

impl<T, NROWS, NCOLS> UnwindSafe for Mat<T, NROWS, NCOLS>
where <NROWS as Mul<NCOLS>>::Output: Sized, <<NROWS as Mul<NCOLS>>::Output as ArrayLength<T>>::ArrayType: UnwindSafe, NROWS: UnwindSafe, NCOLS: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.