Struct Mat

Source
pub struct Mat<const ROWS: usize, const COLS: usize, E, Descriptor>(/* private fields */)
where
    E: MatEl;
Expand description

A matrix structure.

Implementations§

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source

pub fn _fill(scalar: E) -> Self
where E: MatEl,

Fill matrix with a scalar value.

Source

pub const fn as_ptr(&self) -> *const E

Returns a raw pointer to the matrix buffer.

Source

pub fn as_mut_ptr(&mut self) -> *mut E

Returns an unsafe mutable pointer to the slice’s buffer.

Source

pub const fn rows(&self) -> usize

Returns the number of rows in the matrix.

Source

pub const fn cols(&self) -> usize

Returns the number of columns in the matrix.

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source

pub fn dim(&self) -> <Self as Indexable>::Index

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl, Self: RawSliceMut<Scalar = E>,

Source

pub fn from_row_major<const N: usize>(scalars: impl VectorRef<E, N>) -> Self

Creates a matrix assuming the input to be in row major order

Source

pub fn from_column_major<const N: usize>(scalars: impl VectorRef<E, N>) -> Self

Creates a matrix assuming the input to be in column major order

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl, Self: RawSlice,

Source

pub fn raw_slice(&self) -> &[<Self as Collection>::Scalar]

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl, Self: RawSliceMut,

Source

pub fn raw_slice_mut(&mut self) -> &mut [<Self as Collection>::Scalar]

Source

pub fn raw_set_slice(&mut self, scalars: &[<Self as Collection>::Scalar])

Source

pub fn raw_set<const N: usize>( self, scalars: [<Self as Collection>::Scalar; N], ) -> Self

Source

pub fn set<const N: usize>( self, scalars: [<Self as Collection>::Scalar; N], ) -> Self

Source

pub fn with_row_major(self, scalars: &[<Self as Collection>::Scalar]) -> Self

Source

pub fn with_column_major(self, scalars: &[<Self as Collection>::Scalar]) -> Self

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + NdFloat, Self: IndexingRef,

Source

pub fn lane_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>

Source

pub fn lane_indexed_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>

Source

pub fn iter_unstable( &self, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>

Source

pub fn iter_indexed_unstable( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>

Source

pub fn iter_lsfirst( &self, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>

Source

pub fn iter_indexed_lsfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>

Source

pub fn iter_msfirst( &self, ) -> impl Iterator<Item = &<Self as Collection>::Scalar>

Source

pub fn iter_indexed_msfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &<Self as Collection>::Scalar)>

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + NdFloat, Self: IndexingMut,

Source

pub fn lane_iter_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>

Source

pub fn lane_iter_indexed_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>

Source

pub fn iter_unstable_mut( &mut self, ) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>

Source

pub fn iter_indexed_unstable_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>

Source

pub fn iter_lsfirst_mut( &mut self, ) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>

Source

pub fn iter_indexed_lsfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>

Source

pub fn iter_msfirst_mut( &mut self, ) -> impl Iterator<Item = &mut <Self as Collection>::Scalar>

Source

pub fn iter_indexed_msfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut <Self as Collection>::Scalar)>

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + NdFloat, Self: ScalarRef,

Source

pub fn scalar_ref( &self, index: <Self as Indexable>::Index, ) -> &<Self as Collection>::Scalar

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + NdFloat, Self: ScalarMut,

Source

pub fn scalar_mut( &mut self, index: <Self as Indexable>::Index, ) -> &mut <Self as Collection>::Scalar

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl, Self: ConstLayout,

Source

pub fn scalar_offset(index: <Self as Indexable>::Index) -> usize

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source

pub fn transpose(&self) -> Mat<COLS, ROWS, E, Descriptor>
where E: NdFloat + Default + Copy, Self: IndexingRef<Scalar = E>, Mat<COLS, ROWS, E, Descriptor>: IndexingMut<Scalar = E>,

Transpose, rarranging data in memory, not just shape descriptor.

Source§

impl<E, Descriptor> Mat<2, 2, E, Descriptor>
where E: MatEl + NdFloat, Descriptor: Descriptor, Self: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,

Source

pub fn determinant(&self) -> E

Computes the determinant of the matrix

Source

pub fn inverse(&self) -> Option<Self>

Computes the inverse of the matrix. If the determinant is zero - return None

Source§

impl<E, Descriptor> Mat<3, 3, E, Descriptor>
where E: MatEl + NdFloat, Descriptor: Descriptor, Self: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,

Source

pub fn from_cols(x: Vector<E, 3>, y: Vector<E, 3>, z: Vector<E, 3>) -> Self

Construct a matrix from columns

Source

pub fn determinant(&self) -> E

Computes the determinant of the matrix

Source

pub fn inverse(&self) -> Option<Self>

Computes the inverse of the matrix. If the determinant is zero - return None

Source§

impl<E, Descriptor> Mat<4, 4, E, Descriptor>
where E: MatEl + NdFloat, Descriptor: Descriptor, Self: ScalarMut<Scalar = E, Index = Ix2> + RawSliceMut<Scalar = E> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,

Source

pub fn to_array(&self) -> [E; 16]

Converts the matrix to an array

Source

pub fn determinant(&self) -> E
where Mat<3, 3, E, Descriptor>: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,

Computes the determinant of the matrix

Source

pub fn inverse(&self) -> Option<Self>
where Mat<3, 3, E, Descriptor>: RawSliceMut<Scalar = E> + ScalarMut<Scalar = E, Index = Ix2> + ConstLayout<Index = Ix2> + IndexingMut<Scalar = E, Index = Ix2>,

Computes the inverse of the matrix. If the determinant is zero - return None

Trait Implementations§

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor> Add<&Mat<ROWS, COLS, E, Descriptor>> for &Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Descriptor, E: MatEl + NdFloat, Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,

Source§

type Output = Mat<ROWS, COLS, E, Descriptor>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Mat<ROWS, COLS, E, Descriptor>) -> Self::Output

Performs the + operation. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor> Add for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + NdFloat, Descriptor: Descriptor, Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>,

Source§

type Output = Mat<ROWS, COLS, E, Descriptor>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<const ROWS: usize, const COLS: usize, E, Descriptor: Clone> Clone for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + Clone,

Source§

fn clone(&self) -> Mat<ROWS, COLS, E, Descriptor>

Returns a duplicate 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<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Collection for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source§

type Scalar = E

The scalar type contained in the collection.
Source§

impl<E, const ROWS: usize, const COLS: usize> ConstLayout for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>
where E: MatEl,

Source§

fn scalar_offset(index: <Self as Indexable>::Index) -> usize

Get offset for a specified scalar from beginning of underlying buffer.
Source§

impl<E, const ROWS: usize, const COLS: usize> ConstLayout for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>
where E: MatEl,

Source§

fn scalar_offset(index: <Self as Indexable>::Index) -> usize

Get offset for a specified scalar from beginning of underlying buffer.
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Debug for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + Debug, Self: IndexingRef<Scalar = E>,

Source§

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

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

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Default for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor> Div<E> for Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Descriptor, E: MatEl + NdFloat, Self: Indexable<Index = Ix2> + ScalarMut<Scalar = E>,

Source§

type Output = Mat<ROWS, COLS, E, Descriptor>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: E) -> Self::Output

Performs the / operation. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor> DivAssign<E> for Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Descriptor, E: MatEl + NdFloat, Self: Indexable<Index = Ix2> + ScalarMut<Scalar = E>,

Source§

fn div_assign(&mut self, rhs: E)

Performs the /= operation. Read more
Source§

impl<const ROWS: usize, const COLS: usize, E, Descriptor> From<([[E; COLS]; ROWS], PhantomData<Descriptor>)> for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source§

fn from(src: ([[E; COLS]; ROWS], PhantomData<Descriptor>)) -> Self

Converts to this type from the input type.
Source§

impl<const ROWS: usize, const COLS: usize, E, Descriptor: Hash> Hash for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + Hash,

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> Indexable for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source§

type Index = Dim<[usize; 2]>

The type representing the dimension of the object.
Source§

fn dim(&self) -> Self::Index

Returns the dimension of the object. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize> IndexingMut for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>
where E: MatEl + NdFloat,

Source§

fn lane_iter_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &mut Self::Scalar>

Iterate over scalars of a single 1D lane with mutable access. Read more
Source§

fn lane_iter_indexed_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>

Iterate over scalars of a single 1D lane with indices and mutable access. Read more
Source§

fn iter_unstable_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>

Iterate over all scalars with mutable access. Order of iteration is not specified. Read more
Source§

fn iter_indexed_unstable_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>

Iterate over all scalars with indices and mutable access. Order of iteration is not specified. Read more
Source§

fn iter_lsfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>

Iterate over all scalars in least significant dimension order with mutable access. Read more
Source§

fn iter_indexed_lsfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>

Iterate over all scalars with indices in least significant dimension order with mutable access. Read more
Source§

fn iter_msfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>

Iterate over all scalars in most significant dimension order with mutable access. Read more
Source§

fn iter_indexed_msfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>

Iterate over all scalars with indices in most significant dimension order with mutable access. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize> IndexingMut for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>
where E: MatEl + NdFloat,

Source§

fn lane_iter_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &mut Self::Scalar>

Iterate over scalars of a single 1D lane with mutable access. Read more
Source§

fn lane_iter_indexed_mut( &mut self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>

Iterate over scalars of a single 1D lane with indices and mutable access. Read more
Source§

fn iter_unstable_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>

Iterate over all scalars with mutable access. Order of iteration is not specified. Read more
Source§

fn iter_indexed_unstable_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>

Iterate over all scalars with indices and mutable access. Order of iteration is not specified. Read more
Source§

fn iter_lsfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>

Iterate over all scalars in least significant dimension order with mutable access. Read more
Source§

fn iter_indexed_lsfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>

Iterate over all scalars with indices in least significant dimension order with mutable access. Read more
Source§

fn iter_msfirst_mut(&mut self) -> impl Iterator<Item = &mut Self::Scalar>

Iterate over all scalars in most significant dimension order with mutable access. Read more
Source§

fn iter_indexed_msfirst_mut( &mut self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &mut Self::Scalar)>

Iterate over all scalars with indices in most significant dimension order with mutable access. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize> IndexingRef for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>
where E: MatEl + NdFloat,

Source§

fn lane_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &Self::Scalar>

Iterate over scalars of a single 1D lane. Read more
Source§

fn lane_indexed_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>

Iterate over scalars of a single 1D lane with indices. Read more
Source§

fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>

Iterate over all scalars. Order of iteration is not specified. Read more
Source§

fn iter_indexed_unstable( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>

Iterate over all scalars with indices. Order of iteration is not specified. Read more
Source§

fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>

Iterate over all scalars in least significant dimension order. Read more
Source§

fn iter_indexed_lsfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>

Iterate over all scalars with indices in least significant dimension order. Read more
Source§

fn iter_msfirst(&self) -> impl Iterator<Item = &Self::Scalar>

Iterate over all scalars in most significant dimension order. Read more
Source§

fn iter_indexed_msfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>

Iterate over all scalars with indices in most significant dimension order. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize> IndexingRef for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>
where E: MatEl + NdFloat,

Source§

fn lane_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = &Self::Scalar>

Iterate over scalars of a single 1D lane. Read more
Source§

fn lane_indexed_iter( &self, varying_dim: usize, lane: usize, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>

Iterate over scalars of a single 1D lane with indices. Read more
Source§

fn iter_unstable(&self) -> impl Iterator<Item = &Self::Scalar>

Iterate over all scalars. Order of iteration is not specified. Read more
Source§

fn iter_indexed_unstable( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>

Iterate over all scalars with indices. Order of iteration is not specified. Read more
Source§

fn iter_lsfirst(&self) -> impl Iterator<Item = &Self::Scalar>

Iterate over all scalars in least significant dimension order. Read more
Source§

fn iter_indexed_lsfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>

Iterate over all scalars with indices in least significant dimension order. Read more
Source§

fn iter_msfirst(&self) -> impl Iterator<Item = &Self::Scalar>

Iterate over all scalars in most significant dimension order. Read more
Source§

fn iter_indexed_msfirst( &self, ) -> impl Iterator<Item = (<Self as Indexable>::Index, &Self::Scalar)>

Iterate over all scalars with indices in most significant dimension order. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, const COLS2: usize, Descriptor> Mul<&Mat<COLS, COLS2, E, Descriptor>> for &Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Descriptor, E: MatEl + NdFloat, Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>, Mat<COLS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>, Mat<ROWS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + ScalarMut<Scalar = E>,

Source§

type Output = Mat<ROWS, COLS2, E, Descriptor>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Mat<COLS, COLS2, E, Descriptor>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor> Mul<&Vector<E, COLS>> for &Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Descriptor, E: MatEl + NdFloat, Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,

Source§

type Output = Vector<E, COLS>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Vector<E, COLS>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, const COLS2: usize, Descriptor> Mul<Mat<COLS, COLS2, E, Descriptor>> for Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Descriptor, E: MatEl + NdFloat, Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingMut<Scalar = E>, Mat<COLS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>, Mat<ROWS, COLS2, E, Descriptor>: Indexable<Index = Ix2> + ScalarMut<Scalar = E>,

Source§

type Output = Mat<ROWS, COLS2, E, Descriptor>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Mat<COLS, COLS2, E, Descriptor>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor> Mul<Vector<E, COLS>> for Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Descriptor, E: MatEl + NdFloat, Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,

Source§

type Output = Vector<E, COLS>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vector<E, COLS>) -> Self::Output

Performs the * operation. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor> MulAssign<Mat<ROWS, COLS, E, Descriptor>> for Vector<E, COLS>
where Descriptor: Descriptor, E: MatEl + NdFloat, Mat<ROWS, COLS, E, Descriptor>: Indexable<Index = Ix2> + IndexingRef<Scalar = E>,

Source§

fn mul_assign(&mut self, rhs: Mat<ROWS, COLS, E, Descriptor>)

Performs the *= operation. Read more
Source§

impl<const ROWS: usize, const COLS: usize, E, Descriptor: PartialEq> PartialEq for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + PartialEq,

Source§

fn eq(&self, other: &Mat<ROWS, COLS, E, Descriptor>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const ROWS: usize, const COLS: usize, E, Descriptor: PartialOrd> PartialOrd for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + PartialOrd,

Source§

fn partial_cmp( &self, other: &Mat<ROWS, COLS, E, Descriptor>, ) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> RawSlice for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source§

fn raw_slice(&self) -> &[Self::Scalar]

Returns a reference to the underlying data as a flat array.

Source§

impl<E, const ROWS: usize, const COLS: usize> RawSliceMut for Mat<ROWS, COLS, E, DescriptorOrderColumnMajor>
where E: MatEl, Self: Collection<Scalar = E>,

Source§

fn raw_slice_mut(&mut self) -> &mut [Self::Scalar]

Returns a mutable reference to the underlying data as a flat array. Read more
Source§

fn raw_set_slice(&mut self, scalars: &[Self::Scalar])

Sets the underlying data from a slice of scalars. Read more
Source§

fn raw_set<const N: usize>(self, scalars: [Self::Scalar; N]) -> Self

Sets the underlying data from an array of scalars. Read more
Source§

fn with_row_major(self, scalars: &[Self::Scalar]) -> Self

Sets the underlying data from an array of scalars, assuming the input to be in row major order. The resulting data will conform to the type of matrix used - row major or column major. Read more
Source§

fn with_column_major(self, scalars: &[Self::Scalar]) -> Self

Sets the underlying data from an array of scalars, assuming the input to be in column major order. The resulting data will conform to the type of matrix used - row major or column major. Read more
Source§

fn set<const N: usize>(self, scalars: [Self::Scalar; N]) -> Self
where Self: Sized,

The same as from_major_row.
Source§

impl<E, const ROWS: usize, const COLS: usize> RawSliceMut for Mat<ROWS, COLS, E, DescriptorOrderRowMajor>
where E: MatEl, Self: Collection<Scalar = E>,

Source§

fn raw_slice_mut(&mut self) -> &mut [Self::Scalar]

Returns a mutable reference to the underlying data as a flat array. Read more
Source§

fn raw_set_slice(&mut self, scalars: &[Self::Scalar])

Sets the underlying data from a slice of scalars. Read more
Source§

fn raw_set<const N: usize>(self, scalars: [Self::Scalar; N]) -> Self

Sets the underlying data from an array of scalars. Read more
Source§

fn with_row_major(self, scalars: &[Self::Scalar]) -> Self

Sets the underlying data from an array of scalars, assuming the input to be in row major order. The resulting data will conform to the type of matrix used - row major or column major. Read more
Source§

fn with_column_major(self, scalars: &[Self::Scalar]) -> Self

Sets the underlying data from an array of scalars, assuming the input to be in column major order. The resulting data will conform to the type of matrix used - row major or column major. Read more
Source§

fn set<const N: usize>(self, scalars: [Self::Scalar; N]) -> Self
where Self: Sized,

The same as from_major_row.
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> ScalarMut for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + NdFloat, Self: ConstLayout + RawSliceMut,

Source§

fn scalar_mut(&mut self, index: <Self as Indexable>::Index) -> &mut Self::Scalar

Get a mutable reference to a scalar at a specified index. Read more
Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> ScalarRef for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + NdFloat, Self: ConstLayout,

Source§

fn scalar_ref(&self, index: <Self as Indexable>::Index) -> &Self::Scalar

Get a reference to a scalar at a specified index. Read more
Source§

impl<const ROWS: usize, const COLS: usize, E, Descriptor: Copy> Copy for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl + Copy,

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> MatWithShape<ROWS, COLS> for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source§

impl<E, const ROWS: usize, const COLS: usize, Descriptor: Descriptor> MatWithShapeMut<ROWS, COLS> for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Source§

impl<const ROWS: usize, const COLS: usize, E, Descriptor> StructuralPartialEq for Mat<ROWS, COLS, E, Descriptor>
where E: MatEl,

Auto Trait Implementations§

§

impl<const ROWS: usize, const COLS: usize, E, Descriptor> Freeze for Mat<ROWS, COLS, E, Descriptor>
where E: Freeze,

§

impl<const ROWS: usize, const COLS: usize, E, Descriptor> RefUnwindSafe for Mat<ROWS, COLS, E, Descriptor>
where Descriptor: RefUnwindSafe, E: RefUnwindSafe,

§

impl<const ROWS: usize, const COLS: usize, E, Descriptor> Send for Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Send, E: Send,

§

impl<const ROWS: usize, const COLS: usize, E, Descriptor> Sync for Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Sync, E: Sync,

§

impl<const ROWS: usize, const COLS: usize, E, Descriptor> Unpin for Mat<ROWS, COLS, E, Descriptor>
where Descriptor: Unpin, E: Unpin,

§

impl<const ROWS: usize, const COLS: usize, E, Descriptor> UnwindSafe for Mat<ROWS, COLS, E, Descriptor>
where Descriptor: UnwindSafe, E: 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> CloneDyn for T
where T: Clone,

Source§

fn __clone_dyn(&self, _: DontCallMe) -> *mut ()

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<All> From1<()> for All
where All: Default,

Source§

fn from1(_a: ()) -> All

Constructor with a single arguments.
Source§

impl<T, All> From1<(T,)> for All
where All: From1<T>,

Source§

fn from1(arg: (T,)) -> All

Constructor with a single arguments.
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<All, F> Into1<F> for All
where F: From1<All>,

Source§

fn to(self) -> F

Converts this type into the (usually inferred) input type.
Source§

impl<T> IntoResult<T> for T

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

fn to_ref(&self) -> &T

Converts the implementing type to an immutable reference. Read more
Source§

impl<T> ToValue<T> for T

Source§

fn to_value(self) -> T

Obtains the value from the implementing type. Read more
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.
Source§

impl<T> MatEl for T
where T: Copy + Default,