#[non_exhaustive]#[repr(transparent)]pub struct Matrix<T, const R: usize, const C: usize, const LEN: usize> {
pub data: [T; LEN],
}alg only.Expand description
⊕
A static R × C matrix backed by a contiguous row-major array.
R is the number of rows and C is the number of columns.
Elements are stored in row-major order: all columns of the first row, followed by all columns of the second row, and so on.
LEN is the number of stored elements and must equal R * C. It is an
explicit parameter because stable Rust cannot yet generally use R * C
as an array length involving outer const parameters.
The shape relationship is validated by its constructors.
§Coordinates
Element coordinates use (row, column) order.
use devela::Matrix;
let matrix = Matrix::<_, 2, 3, 6>::new([
1, 2, 3,
4, 5, 6,
]);
assert_eq!(matrix[(0, 2)], 3);
assert_eq!(matrix[(1, 0)], 4);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.data: [T; LEN]The matrix elements in contiguous row-major order.
Implementations§
Source§impl<T, const R: usize, const C: usize, const LEN: usize> Matrix<T, R, C, LEN>
impl<T, const R: usize, const C: usize, const LEN: usize> Matrix<T, R, C, LEN>
Sourcepub const fn new(data: [T; LEN]) -> Self
pub const fn new(data: [T; LEN]) -> Self
Creates a matrix from its contiguous row-major elements.
§Panics
Panics if:
R * Ccannot be represented byusize, orLEN != R * C.
Sourcepub const fn column_count(&self) -> usize
pub const fn column_count(&self) -> usize
Returns the number of matrix columns.
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Returns whether the matrix contains no elements.
For a valid matrix this is equivalent to either dimension being zero.
Sourcepub const fn is_square(&self) -> bool
pub const fn is_square(&self) -> bool
Returns whether the matrix has the same number of rows and columns.
Sourcepub const fn get_index(row: usize, column: usize) -> Option<usize> ⓘ
pub const fn get_index(row: usize, column: usize) -> Option<usize> ⓘ
Returns the flat row-major index of (row, column).
Returns None when either coordinate is out of bounds or when the
declared dimensions cannot be multiplied without overflow.
Matrix coordinates map to Order coordinates as:
column → x,row → y,C → width.
Sourcepub const fn get(&self, row: usize, column: usize) -> Option<&T> ⓘ
pub const fn get(&self, row: usize, column: usize) -> Option<&T> ⓘ
Returns a shared reference to the element at (row, column).
Returns None when either coordinate is out of bounds.
Sourcepub const fn get_mut(&mut self, row: usize, column: usize) -> Option<&mut T> ⓘ
pub const fn get_mut(&mut self, row: usize, column: usize) -> Option<&mut T> ⓘ
Returns an exclusive reference to the element at (row, column).
Returns None when either coordinate is out of bounds.
Source§impl<T: Copy, const R: usize, const C: usize, const LEN: usize> Matrix<T, R, C, LEN>
impl<T: Copy, const R: usize, const C: usize, const LEN: usize> Matrix<T, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i8, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: i8) -> Self
pub const fn mul_scalar(self, scalar: i8) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<i8, C>) -> Vector<i8, R>
pub const fn mul_vector(&self, vector: &Vector<i8, C>) -> Vector<i8, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i8, R, INNER, LEFT_LEN>,
right: &Matrix<i8, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i8, R, INNER, LEFT_LEN>, right: &Matrix<i8, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i8, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: i8) -> Self
pub const fn div_scalar(self, scalar: i8) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: i8) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: i8) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i8, R, INNER, LEFT_LEN>,
right: &Matrix<i8, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i8, R, INNER, LEFT_LEN>, right: &Matrix<i8, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<i8, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<i8, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i16, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: i16) -> Self
pub const fn mul_scalar(self, scalar: i16) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<i16, C>) -> Vector<i16, R>
pub const fn mul_vector(&self, vector: &Vector<i16, C>) -> Vector<i16, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i16, R, INNER, LEFT_LEN>,
right: &Matrix<i16, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i16, R, INNER, LEFT_LEN>, right: &Matrix<i16, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i16, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: i16) -> Self
pub const fn div_scalar(self, scalar: i16) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: i16) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: i16) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i16, R, INNER, LEFT_LEN>,
right: &Matrix<i16, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i16, R, INNER, LEFT_LEN>, right: &Matrix<i16, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<i16, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<i16, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i32, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: i32) -> Self
pub const fn mul_scalar(self, scalar: i32) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<i32, C>) -> Vector<i32, R>
pub const fn mul_vector(&self, vector: &Vector<i32, C>) -> Vector<i32, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i32, R, INNER, LEFT_LEN>,
right: &Matrix<i32, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i32, R, INNER, LEFT_LEN>, right: &Matrix<i32, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i32, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: i32) -> Self
pub const fn div_scalar(self, scalar: i32) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: i32) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: i32) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i32, R, INNER, LEFT_LEN>,
right: &Matrix<i32, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i32, R, INNER, LEFT_LEN>, right: &Matrix<i32, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<i32, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<i32, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i64, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: i64) -> Self
pub const fn mul_scalar(self, scalar: i64) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<i64, C>) -> Vector<i64, R>
pub const fn mul_vector(&self, vector: &Vector<i64, C>) -> Vector<i64, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i64, R, INNER, LEFT_LEN>,
right: &Matrix<i64, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i64, R, INNER, LEFT_LEN>, right: &Matrix<i64, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i64, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: i64) -> Self
pub const fn div_scalar(self, scalar: i64) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: i64) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: i64) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i64, R, INNER, LEFT_LEN>,
right: &Matrix<i64, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i64, R, INNER, LEFT_LEN>, right: &Matrix<i64, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<i64, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<i64, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i128, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: i128) -> Self
pub const fn mul_scalar(self, scalar: i128) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<i128, C>) -> Vector<i128, R>
pub const fn mul_vector(&self, vector: &Vector<i128, C>) -> Vector<i128, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i128, R, INNER, LEFT_LEN>,
right: &Matrix<i128, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i128, R, INNER, LEFT_LEN>, right: &Matrix<i128, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<i128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<i128, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: i128) -> Self
pub const fn div_scalar(self, scalar: i128) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: i128) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: i128) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<i128, R, INNER, LEFT_LEN>,
right: &Matrix<i128, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<i128, R, INNER, LEFT_LEN>, right: &Matrix<i128, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<i128, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<i128, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<isize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<isize, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: isize) -> Self
pub const fn mul_scalar(self, scalar: isize) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<isize, C>) -> Vector<isize, R>
pub const fn mul_vector(&self, vector: &Vector<isize, C>) -> Vector<isize, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<isize, R, INNER, LEFT_LEN>,
right: &Matrix<isize, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<isize, R, INNER, LEFT_LEN>, right: &Matrix<isize, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<isize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<isize, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: isize) -> Self
pub const fn div_scalar(self, scalar: isize) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: isize) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: isize) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<isize, R, INNER, LEFT_LEN>,
right: &Matrix<isize, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<isize, R, INNER, LEFT_LEN>, right: &Matrix<isize, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<isize, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<isize, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u8, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: u8) -> Self
pub const fn mul_scalar(self, scalar: u8) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<u8, C>) -> Vector<u8, R>
pub const fn mul_vector(&self, vector: &Vector<u8, C>) -> Vector<u8, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u8, R, INNER, LEFT_LEN>,
right: &Matrix<u8, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u8, R, INNER, LEFT_LEN>, right: &Matrix<u8, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u8, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: u8) -> Self
pub const fn div_scalar(self, scalar: u8) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: u8) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: u8) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u8, R, INNER, LEFT_LEN>,
right: &Matrix<u8, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u8, R, INNER, LEFT_LEN>, right: &Matrix<u8, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<u8, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<u8, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u16, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: u16) -> Self
pub const fn mul_scalar(self, scalar: u16) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<u16, C>) -> Vector<u16, R>
pub const fn mul_vector(&self, vector: &Vector<u16, C>) -> Vector<u16, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u16, R, INNER, LEFT_LEN>,
right: &Matrix<u16, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u16, R, INNER, LEFT_LEN>, right: &Matrix<u16, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u16, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: u16) -> Self
pub const fn div_scalar(self, scalar: u16) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: u16) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: u16) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u16, R, INNER, LEFT_LEN>,
right: &Matrix<u16, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u16, R, INNER, LEFT_LEN>, right: &Matrix<u16, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<u16, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<u16, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u32, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: u32) -> Self
pub const fn mul_scalar(self, scalar: u32) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<u32, C>) -> Vector<u32, R>
pub const fn mul_vector(&self, vector: &Vector<u32, C>) -> Vector<u32, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u32, R, INNER, LEFT_LEN>,
right: &Matrix<u32, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u32, R, INNER, LEFT_LEN>, right: &Matrix<u32, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u32, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: u32) -> Self
pub const fn div_scalar(self, scalar: u32) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: u32) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: u32) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u32, R, INNER, LEFT_LEN>,
right: &Matrix<u32, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u32, R, INNER, LEFT_LEN>, right: &Matrix<u32, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<u32, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<u32, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u64, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: u64) -> Self
pub const fn mul_scalar(self, scalar: u64) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<u64, C>) -> Vector<u64, R>
pub const fn mul_vector(&self, vector: &Vector<u64, C>) -> Vector<u64, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u64, R, INNER, LEFT_LEN>,
right: &Matrix<u64, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u64, R, INNER, LEFT_LEN>, right: &Matrix<u64, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u64, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: u64) -> Self
pub const fn div_scalar(self, scalar: u64) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: u64) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: u64) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u64, R, INNER, LEFT_LEN>,
right: &Matrix<u64, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u64, R, INNER, LEFT_LEN>, right: &Matrix<u64, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<u64, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<u64, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u128, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: u128) -> Self
pub const fn mul_scalar(self, scalar: u128) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<u128, C>) -> Vector<u128, R>
pub const fn mul_vector(&self, vector: &Vector<u128, C>) -> Vector<u128, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u128, R, INNER, LEFT_LEN>,
right: &Matrix<u128, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u128, R, INNER, LEFT_LEN>, right: &Matrix<u128, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<u128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<u128, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: u128) -> Self
pub const fn div_scalar(self, scalar: u128) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: u128) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: u128) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<u128, R, INNER, LEFT_LEN>,
right: &Matrix<u128, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<u128, R, INNER, LEFT_LEN>, right: &Matrix<u128, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<u128, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<u128, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<usize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<usize, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: usize) -> Self
pub const fn mul_scalar(self, scalar: usize) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<usize, C>) -> Vector<usize, R>
pub const fn mul_vector(&self, vector: &Vector<usize, C>) -> Vector<usize, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<usize, R, INNER, LEFT_LEN>,
right: &Matrix<usize, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<usize, R, INNER, LEFT_LEN>, right: &Matrix<usize, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<usize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<usize, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: usize) -> Self
pub const fn div_scalar(self, scalar: usize) -> Self
Divides every matrix entry by scalar.
§Panics
Panics if scalar is zero.
For signed integers, it also panics if an entry is the minimum
representable value and scalar is -1.
Sourcepub const fn checked_div_scalar(self, scalar: usize) -> Option<Self> ⓘ
pub const fn checked_div_scalar(self, scalar: usize) -> Option<Self> ⓘ
Returns the entry-wise quotient.
Returns None if scalar is zero or if any entry division
overflows.
Sourcepub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<usize, R, INNER, LEFT_LEN>,
right: &Matrix<usize, INNER, C, RIGHT_LEN>,
) -> Option<Self> ⓘ
pub const fn checked_product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<usize, R, INNER, LEFT_LEN>, right: &Matrix<usize, INNER, C, RIGHT_LEN>, ) -> Option<Self> ⓘ
Returns the checked matrix product of left and right.
Returns None if any individual multiplication or accumulation
overflows.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Source§impl<const N: usize, const LEN: usize> Matrix<usize, N, N, LEN>
impl<const N: usize, const LEN: usize> Matrix<usize, N, N, LEN>
Sourcepub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
pub const fn checked_mul_square(&self, other: &Self) -> Option<Self> ⓘ
Returns the checked product of two square matrices.
Returns None if any multiplication or accumulation overflows.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<f32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<f32, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: f32) -> Self
pub const fn mul_scalar(self, scalar: f32) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<f32, C>) -> Vector<f32, R>
pub const fn mul_vector(&self, vector: &Vector<f32, C>) -> Vector<f32, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<f32, R, INNER, LEFT_LEN>,
right: &Matrix<f32, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<f32, R, INNER, LEFT_LEN>, right: &Matrix<f32, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<f32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<f32, R, C, LEN>
Sourcepub const fn div_scalar(self, scalar: f32) -> Self
pub const fn div_scalar(self, scalar: f32) -> Self
Divides every matrix entry by scalar.
Each entry follows IEEE 754 floating-point division semantics.
Source§impl<const R: usize, const C: usize, const LEN: usize> Matrix<f64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Matrix<f64, R, C, LEN>
Sourcepub const fn add(self, other: Self) -> Self
pub const fn add(self, other: Self) -> Self
Adds another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn sub(self, other: Self) -> Self
pub const fn sub(self, other: Self) -> Self
Subtracts another matrix entry by entry.
Each entry follows the arithmetic semantics of its primitive type.
Sourcepub const fn mul_scalar(self, scalar: f64) -> Self
pub const fn mul_scalar(self, scalar: f64) -> Self
Multiplies every matrix entry by scalar.
Sourcepub const fn mul_vector(&self, vector: &Vector<f64, C>) -> Vector<f64, R>
pub const fn mul_vector(&self, vector: &Vector<f64, C>) -> Vector<f64, R>
Multiplies this matrix by a column vector.
An R × C matrix maps a C-dimensional vector to an
R-dimensional vector.
Each accumulation follows the arithmetic semantics of the primitive element type.
Sourcepub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>(
left: &Matrix<f64, R, INNER, LEFT_LEN>,
right: &Matrix<f64, INNER, C, RIGHT_LEN>,
) -> Self
pub const fn product<const INNER: usize, const LEFT_LEN: usize, const RIGHT_LEN: usize>( left: &Matrix<f64, R, INNER, LEFT_LEN>, right: &Matrix<f64, INNER, C, RIGHT_LEN>, ) -> Self
Returns the matrix product of left and right.
left has shape R × INNER, right has shape INNER × C,
and the resulting matrix has shape R × C.
Each multiplication and accumulation follows the arithmetic semantics of the primitive element type.
§Panics
Panics if the declared backing lengths do not match their matrix dimensions.
Trait Implementations§
Source§impl<T: Add<U>, U, const R: usize, const C: usize, const LEN: usize> Add<Matrix<U, R, C, LEN>> for Matrix<T, R, C, LEN>
impl<T: Add<U>, U, const R: usize, const C: usize, const LEN: usize> Add<Matrix<U, R, C, LEN>> for Matrix<T, R, C, LEN>
Source§impl<T: AddAssign<U>, U, const R: usize, const C: usize, const LEN: usize> AddAssign<Matrix<U, R, C, LEN>> for Matrix<T, R, C, LEN>
impl<T: AddAssign<U>, U, const R: usize, const C: usize, const LEN: usize> AddAssign<Matrix<U, R, C, LEN>> for Matrix<T, R, C, LEN>
Source§fn add_assign(&mut self, rhs: Matrix<U, R, C, LEN>)
fn add_assign(&mut self, rhs: Matrix<U, R, C, LEN>)
+= operation. Read moreSource§impl<T, const R: usize, const C: usize, const LEN: usize> AsMut<[T]> for Matrix<T, R, C, LEN>
impl<T, const R: usize, const C: usize, const LEN: usize> AsMut<[T]> for Matrix<T, R, C, LEN>
Source§impl<T, const R: usize, const C: usize, const LEN: usize> AsRef<[T]> for Matrix<T, R, C, LEN>
impl<T, const R: usize, const C: usize, const LEN: usize> AsRef<[T]> for Matrix<T, R, C, LEN>
Source§impl<T: Clone, const R: usize, const C: usize, const LEN: usize> Clone for Matrix<T, R, C, LEN>
impl<T: Clone, const R: usize, const C: usize, const LEN: usize> Clone for Matrix<T, R, C, LEN>
Source§impl<T: ConstInit, const R: usize, const C: usize, const LEN: usize> ConstInit for Matrix<T, R, C, LEN>
impl<T: ConstInit, const R: usize, const C: usize, const LEN: usize> ConstInit for Matrix<T, R, C, LEN>
impl<T: Copy, const R: usize, const C: usize, const LEN: usize> Copy for Matrix<T, R, C, LEN>
Source§impl<T: Debug, const R: usize, const C: usize, const LEN: usize> Debug for Matrix<T, R, C, LEN>
impl<T: Debug, const R: usize, const C: usize, const LEN: usize> Debug for Matrix<T, R, C, LEN>
Source§impl<T: Default, const R: usize, const C: usize, const LEN: usize> Default for Matrix<T, R, C, LEN>
impl<T: Default, const R: usize, const C: usize, const LEN: usize> Default for Matrix<T, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Div<isize> for Matrix<isize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Div<isize> for Matrix<isize, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Div<usize> for Matrix<usize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Div<usize> for Matrix<usize, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<f32> for Matrix<f32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<f32> for Matrix<f32, R, C, LEN>
Source§fn div_assign(&mut self, scalar: f32)
fn div_assign(&mut self, scalar: f32)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<f64> for Matrix<f64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<f64> for Matrix<f64, R, C, LEN>
Source§fn div_assign(&mut self, scalar: f64)
fn div_assign(&mut self, scalar: f64)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i8> for Matrix<i8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i8> for Matrix<i8, R, C, LEN>
Source§fn div_assign(&mut self, scalar: i8)
fn div_assign(&mut self, scalar: i8)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i16> for Matrix<i16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i16> for Matrix<i16, R, C, LEN>
Source§fn div_assign(&mut self, scalar: i16)
fn div_assign(&mut self, scalar: i16)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i32> for Matrix<i32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i32> for Matrix<i32, R, C, LEN>
Source§fn div_assign(&mut self, scalar: i32)
fn div_assign(&mut self, scalar: i32)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i64> for Matrix<i64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i64> for Matrix<i64, R, C, LEN>
Source§fn div_assign(&mut self, scalar: i64)
fn div_assign(&mut self, scalar: i64)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i128> for Matrix<i128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<i128> for Matrix<i128, R, C, LEN>
Source§fn div_assign(&mut self, scalar: i128)
fn div_assign(&mut self, scalar: i128)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<isize> for Matrix<isize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<isize> for Matrix<isize, R, C, LEN>
Source§fn div_assign(&mut self, scalar: isize)
fn div_assign(&mut self, scalar: isize)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u8> for Matrix<u8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u8> for Matrix<u8, R, C, LEN>
Source§fn div_assign(&mut self, scalar: u8)
fn div_assign(&mut self, scalar: u8)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u16> for Matrix<u16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u16> for Matrix<u16, R, C, LEN>
Source§fn div_assign(&mut self, scalar: u16)
fn div_assign(&mut self, scalar: u16)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u32> for Matrix<u32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u32> for Matrix<u32, R, C, LEN>
Source§fn div_assign(&mut self, scalar: u32)
fn div_assign(&mut self, scalar: u32)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u64> for Matrix<u64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u64> for Matrix<u64, R, C, LEN>
Source§fn div_assign(&mut self, scalar: u64)
fn div_assign(&mut self, scalar: u64)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u128> for Matrix<u128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<u128> for Matrix<u128, R, C, LEN>
Source§fn div_assign(&mut self, scalar: u128)
fn div_assign(&mut self, scalar: u128)
/= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> DivAssign<usize> for Matrix<usize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> DivAssign<usize> for Matrix<usize, R, C, LEN>
Source§fn div_assign(&mut self, scalar: usize)
fn div_assign(&mut self, scalar: usize)
/= operation. Read moreimpl<T: Eq, const R: usize, const C: usize, const LEN: usize> Eq for Matrix<T, R, C, LEN>
Source§impl<T: Hash, const R: usize, const C: usize, const LEN: usize> Hash for Matrix<T, R, C, LEN>
impl<T: Hash, const R: usize, const C: usize, const LEN: usize> Hash for Matrix<T, R, C, LEN>
Source§impl<T, const R: usize, const C: usize, const LEN: usize> Index<(usize, usize)> for Matrix<T, R, C, LEN>
impl<T, const R: usize, const C: usize, const LEN: usize> Index<(usize, usize)> for Matrix<T, R, C, LEN>
Source§impl<T, const R: usize, const C: usize, const LEN: usize> IndexMut<(usize, usize)> for Matrix<T, R, C, LEN>
impl<T, const R: usize, const C: usize, const LEN: usize> IndexMut<(usize, usize)> for Matrix<T, R, C, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<f32, N, N, LEN>> for &Matrix<f32, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<f32, N, N, LEN>> for &Matrix<f32, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<f64, N, N, LEN>> for &Matrix<f64, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<f64, N, N, LEN>> for &Matrix<f64, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<i8, N, N, LEN>> for &Matrix<i8, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<i8, N, N, LEN>> for &Matrix<i8, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<i16, N, N, LEN>> for &Matrix<i16, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<i16, N, N, LEN>> for &Matrix<i16, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<i32, N, N, LEN>> for &Matrix<i32, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<i32, N, N, LEN>> for &Matrix<i32, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<i64, N, N, LEN>> for &Matrix<i64, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<i64, N, N, LEN>> for &Matrix<i64, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<i128, N, N, LEN>> for &Matrix<i128, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<i128, N, N, LEN>> for &Matrix<i128, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<isize, N, N, LEN>> for &Matrix<isize, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<isize, N, N, LEN>> for &Matrix<isize, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<u8, N, N, LEN>> for &Matrix<u8, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<u8, N, N, LEN>> for &Matrix<u8, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<u16, N, N, LEN>> for &Matrix<u16, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<u16, N, N, LEN>> for &Matrix<u16, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<u32, N, N, LEN>> for &Matrix<u32, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<u32, N, N, LEN>> for &Matrix<u32, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<u64, N, N, LEN>> for &Matrix<u64, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<u64, N, N, LEN>> for &Matrix<u64, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<u128, N, N, LEN>> for &Matrix<u128, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<u128, N, N, LEN>> for &Matrix<u128, N, N, LEN>
Source§impl<const N: usize, const LEN: usize> Mul<&Matrix<usize, N, N, LEN>> for &Matrix<usize, N, N, LEN>
impl<const N: usize, const LEN: usize> Mul<&Matrix<usize, N, N, LEN>> for &Matrix<usize, N, N, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<f32, C>> for &Matrix<f32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<f32, C>> for &Matrix<f32, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<f64, C>> for &Matrix<f64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<f64, C>> for &Matrix<f64, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i8, C>> for &Matrix<i8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i8, C>> for &Matrix<i8, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i16, C>> for &Matrix<i16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i16, C>> for &Matrix<i16, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i32, C>> for &Matrix<i32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i32, C>> for &Matrix<i32, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i64, C>> for &Matrix<i64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i64, C>> for &Matrix<i64, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i128, C>> for &Matrix<i128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<i128, C>> for &Matrix<i128, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<isize, C>> for &Matrix<isize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<isize, C>> for &Matrix<isize, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u8, C>> for &Matrix<u8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u8, C>> for &Matrix<u8, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u16, C>> for &Matrix<u16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u16, C>> for &Matrix<u16, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u32, C>> for &Matrix<u32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u32, C>> for &Matrix<u32, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u64, C>> for &Matrix<u64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u64, C>> for &Matrix<u64, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u128, C>> for &Matrix<u128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<u128, C>> for &Matrix<u128, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<usize, C>> for &Matrix<usize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<&Vector<usize, C>> for &Matrix<usize, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Matrix<isize, R, C, LEN>> for isize
impl<const R: usize, const C: usize, const LEN: usize> Mul<Matrix<isize, R, C, LEN>> for isize
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Matrix<usize, R, C, LEN>> for usize
impl<const R: usize, const C: usize, const LEN: usize> Mul<Matrix<usize, R, C, LEN>> for usize
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<f32, C>> for Matrix<f32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<f32, C>> for Matrix<f32, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<f64, C>> for Matrix<f64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<f64, C>> for Matrix<f64, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i8, C>> for Matrix<i8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i8, C>> for Matrix<i8, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i16, C>> for Matrix<i16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i16, C>> for Matrix<i16, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i32, C>> for Matrix<i32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i32, C>> for Matrix<i32, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i64, C>> for Matrix<i64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i64, C>> for Matrix<i64, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i128, C>> for Matrix<i128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<i128, C>> for Matrix<i128, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<isize, C>> for Matrix<isize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<isize, C>> for Matrix<isize, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u8, C>> for Matrix<u8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u8, C>> for Matrix<u8, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u16, C>> for Matrix<u16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u16, C>> for Matrix<u16, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u32, C>> for Matrix<u32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u32, C>> for Matrix<u32, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u64, C>> for Matrix<u64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u64, C>> for Matrix<u64, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u128, C>> for Matrix<u128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<u128, C>> for Matrix<u128, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<usize, C>> for Matrix<usize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<Vector<usize, C>> for Matrix<usize, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<isize> for Matrix<isize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<isize> for Matrix<isize, R, C, LEN>
Source§impl<const R: usize, const C: usize, const LEN: usize> Mul<usize> for Matrix<usize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> Mul<usize> for Matrix<usize, R, C, LEN>
Source§impl<const N: usize, const LEN: usize> MulAssign for Matrix<i8, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<i8, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<i16, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<i16, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<i32, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<i32, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<i64, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<i64, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<i128, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<i128, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<isize, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<isize, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<u8, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<u8, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<u16, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<u16, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<u32, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<u32, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<u64, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<u64, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<u128, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<u128, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<usize, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<usize, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<f32, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<f32, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const N: usize, const LEN: usize> MulAssign for Matrix<f64, N, N, LEN>
impl<const N: usize, const LEN: usize> MulAssign for Matrix<f64, N, N, LEN>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<f32> for Matrix<f32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<f32> for Matrix<f32, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: f32)
fn mul_assign(&mut self, scalar: f32)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<f64> for Matrix<f64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<f64> for Matrix<f64, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: f64)
fn mul_assign(&mut self, scalar: f64)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i8> for Matrix<i8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i8> for Matrix<i8, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: i8)
fn mul_assign(&mut self, scalar: i8)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i16> for Matrix<i16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i16> for Matrix<i16, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: i16)
fn mul_assign(&mut self, scalar: i16)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i32> for Matrix<i32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i32> for Matrix<i32, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: i32)
fn mul_assign(&mut self, scalar: i32)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i64> for Matrix<i64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i64> for Matrix<i64, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: i64)
fn mul_assign(&mut self, scalar: i64)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i128> for Matrix<i128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<i128> for Matrix<i128, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: i128)
fn mul_assign(&mut self, scalar: i128)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<isize> for Matrix<isize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<isize> for Matrix<isize, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: isize)
fn mul_assign(&mut self, scalar: isize)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u8> for Matrix<u8, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u8> for Matrix<u8, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: u8)
fn mul_assign(&mut self, scalar: u8)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u16> for Matrix<u16, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u16> for Matrix<u16, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: u16)
fn mul_assign(&mut self, scalar: u16)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u32> for Matrix<u32, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u32> for Matrix<u32, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: u32)
fn mul_assign(&mut self, scalar: u32)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u64> for Matrix<u64, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u64> for Matrix<u64, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: u64)
fn mul_assign(&mut self, scalar: u64)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u128> for Matrix<u128, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<u128> for Matrix<u128, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: u128)
fn mul_assign(&mut self, scalar: u128)
*= operation. Read moreSource§impl<const R: usize, const C: usize, const LEN: usize> MulAssign<usize> for Matrix<usize, R, C, LEN>
impl<const R: usize, const C: usize, const LEN: usize> MulAssign<usize> for Matrix<usize, R, C, LEN>
Source§fn mul_assign(&mut self, scalar: usize)
fn mul_assign(&mut self, scalar: usize)
*= operation. Read moreSource§impl<T: PartialEq, const R: usize, const C: usize, const LEN: usize> PartialEq for Matrix<T, R, C, LEN>
impl<T: PartialEq, const R: usize, const C: usize, const LEN: usize> PartialEq for Matrix<T, R, C, LEN>
Auto Trait Implementations§
impl<T, const R: usize, const C: usize, const LEN: usize> Freeze for Matrix<T, R, C, LEN>
impl<T, const R: usize, const C: usize, const LEN: usize> RefUnwindSafe for Matrix<T, R, C, LEN>where
[T; LEN]: RefUnwindSafe,
impl<T, const R: usize, const C: usize, const LEN: usize> Send for Matrix<T, R, C, LEN>
impl<T, const R: usize, const C: usize, const LEN: usize> Sync for Matrix<T, R, C, LEN>
impl<T, const R: usize, const C: usize, const LEN: usize> Unpin for Matrix<T, R, C, LEN>
impl<T, const R: usize, const C: usize, const LEN: usize> UnsafeUnpin for Matrix<T, R, C, LEN>where
[T; LEN]: UnsafeUnpin,
impl<T, const R: usize, const C: usize, const LEN: usize> UnwindSafe for Matrix<T, R, C, LEN>where
[T; LEN]: UnwindSafe,
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Source§fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc only.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
Source§impl<T> ByteSized for T
impl<T> ByteSized for T
Source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Source§fn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Source§fn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Source§fn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Source§fn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Source§fn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Source§fn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true if dropping values of this type matters. Read moreSource§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self without running its destructor. Read moreSource§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Source§unsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSource§unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSource§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
unsafe_slice only.