[−][src]Struct aljabar::Matrix
An N
-by-M
Column Major matrix.
Matrices can be created from arrays of Vectors of any size and scalar type. As with Vectors there are convenience constructor functions for square matrices of the most common sizes.
All operations performed on matrices produce fixed-size outputs. For example,
taking the transpose
of a non-square matrix will produce a matrix with the
width and height swapped:
Methods
impl<T, const N: usize, const M: usize> Matrix<T, { N }, { M }>
[src]
Trait Implementations
impl<T, const N: usize, const M: usize> Zero for Matrix<T, { N }, { M }> where
T: Zero,
Vector<T, { N }>: Zero,
[src]
T: Zero,
Vector<T, { N }>: Zero,
impl<T, const N: usize> One for Matrix<T, { N }, { N }> where
T: Zero + One + Clone,
Self: PartialEq<Self> + SquareMatrix<T, { N }>,
[src]
T: Zero + One + Clone,
Self: PartialEq<Self> + SquareMatrix<T, { N }>,
Constructs a unit matrix.
impl<Scalar, const N: usize> SquareMatrix<Scalar, N> for Matrix<Scalar, { N }, { N }> where
Scalar: Clone,
Self: Add<Self>,
Self: Sub<Self>,
Self: Mul<Self>,
Self: Mul<Vector<Scalar, { N }>, Output = Vector<Scalar, { N }>>,
[src]
Scalar: Clone,
Self: Add<Self>,
Self: Sub<Self>,
Self: Mul<Self>,
Self: Mul<Vector<Scalar, { N }>, Output = Vector<Scalar, { N }>>,
impl<A, B, RHS, const N: usize, const M: usize> PartialEq<RHS> for Matrix<A, { N }, { M }> where
RHS: Deref<Target = [Vector<B, { N }>; {M}]>,
A: PartialEq<B>,
[src]
RHS: Deref<Target = [Vector<B, { N }>; {M}]>,
A: PartialEq<B>,
fn eq(&self, other: &RHS) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T, const N: usize, const M: usize> Copy for Matrix<T, { N }, { M }> where
T: Copy,
[src]
T: Copy,
impl<T, const N: usize, const M: usize> From<[Vector<T, N>; M]> for Matrix<T, { N }, { M }>
[src]
impl<T, const N: usize, const M: usize> Clone for Matrix<T, { N }, { M }> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T, const N: usize, const M: usize> Deref for Matrix<T, { N }, { M }>
[src]
type Target = [Vector<T, { N }>; {M}]
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<T, const N: usize, const M: usize> DerefMut for Matrix<T, { N }, { M }>
[src]
impl<A, B, const N: usize, const M: usize> Add<Matrix<B, N, M>> for Matrix<A, { N }, { M }> where
A: Add<B>,
[src]
A: Add<B>,
Element-wise addition of two equal sized matrices.
type Output = Matrix<<A as Add<B>>::Output, { N }, { M }>
The resulting type after applying the +
operator.
fn add(self, rhs: Matrix<B, { N }, { M }>) -> Self::Output
[src]
impl<A, B, const N: usize, const M: usize> Sub<Matrix<B, N, M>> for Matrix<A, { N }, { M }> where
A: Sub<B>,
[src]
A: Sub<B>,
Element-wise subtraction of two equal sized matrices.
type Output = Matrix<<A as Sub<B>>::Output, { N }, { M }>
The resulting type after applying the -
operator.
fn sub(self, rhs: Matrix<B, { N }, { M }>) -> Self::Output
[src]
impl<T, const N: usize, const M: usize, const P: usize> Mul<Matrix<T, M, P>> for Matrix<T, { N }, { M }> where
T: Add<T, Output = T> + Mul<T, Output = T> + Clone,
Vector<T, { M }>: InnerSpace,
[src]
T: Add<T, Output = T> + Mul<T, Output = T> + Clone,
Vector<T, { M }>: InnerSpace,
type Output = Matrix<<Vector<T, { M }> as VectorSpace>::Scalar, { N }, { P }>
The resulting type after applying the *
operator.
fn mul(self, rhs: Matrix<T, { M }, { P }>) -> Self::Output
[src]
impl<T, const N: usize, const M: usize> Mul<Vector<T, M>> for Matrix<T, { N }, { M }> where
T: Add<T, Output = T> + Mul<T, Output = T> + Clone,
Vector<T, { M }>: InnerSpace,
[src]
T: Add<T, Output = T> + Mul<T, Output = T> + Clone,
Vector<T, { M }>: InnerSpace,
type Output = Vector<<Vector<T, { M }> as VectorSpace>::Scalar, { N }>
The resulting type after applying the *
operator.
fn mul(self, rhs: Vector<T, { M }>) -> Self::Output
[src]
impl<T, const N: usize, const M: usize> Mul<T> for Matrix<T, { N }, { M }> where
T: Mul<T, Output = T> + Clone,
[src]
T: Mul<T, Output = T> + Clone,
Scalar multiply
type Output = Matrix<T, { N }, { M }>
The resulting type after applying the *
operator.
fn mul(self, scalar: T) -> Self::Output
[src]
impl<T, const N: usize, const M: usize> Neg for Matrix<T, { N }, { M }> where
T: Neg,
[src]
T: Neg,
type Output = Matrix<<T as Neg>::Output, { N }, { M }>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<A, B, const N: usize, const M: usize> AddAssign<Matrix<B, N, M>> for Matrix<A, { N }, { M }> where
A: AddAssign<B>,
[src]
A: AddAssign<B>,
fn add_assign(&mut self, rhs: Matrix<B, { N }, { M }>)
[src]
impl<A, B, const N: usize, const M: usize> SubAssign<Matrix<B, N, M>> for Matrix<A, { N }, { M }> where
A: SubAssign<B>,
[src]
A: SubAssign<B>,
fn sub_assign(&mut self, rhs: Matrix<B, { N }, { M }>)
[src]
impl<T, const N: usize, const M: usize> Debug for Matrix<T, { N }, { M }> where
T: Debug,
[src]
T: Debug,
I'm not quite sure how to format the debug output for a matrix.
Auto Trait Implementations
impl<const N: usize, const M: usize, T> Send for Matrix<T, N, M> where
T: Send,
T: Send,
impl<const N: usize, const M: usize, T> Unpin for Matrix<T, N, M> where
T: Unpin,
T: Unpin,
impl<const N: usize, const M: usize, T> Sync for Matrix<T, N, M> where
T: Sync,
T: Sync,
impl<const N: usize, const M: usize, T> UnwindSafe for Matrix<T, N, M> where
T: UnwindSafe,
T: UnwindSafe,
impl<const N: usize, const M: usize, T> RefUnwindSafe for Matrix<T, N, M> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,