Trait geo_nd::SqMatrix [−][src]
pub trait SqMatrix<V: Vector<F, D>, F: Float, const D: usize, const D2: usize>: Clone + Copy + Debug + Default + AsRef<[F; D2]> + AsMut<[F; D2]> + AsRef<[F]> + AsMut<[F]> + Add<Output = Self> + AddAssign + Sub<Output = Self> + SubAssign + Mul<Output = Self> + MulAssign + Mul<F, Output = Self> + MulAssign<F> + Div<F, Output = Self> + DivAssign<F> {
fn from_array(data: [F; D2]) -> Self;
fn identity() -> Self;
fn zero() -> Self;
fn is_zero(&self) -> bool;
fn set_zero(&mut self);
fn transpose(&self) -> Self;
fn determinant(&self) -> F;
fn inverse(&self) -> Self;
fn transform(&self, v: V) -> V;
}
Expand description
The SqMatrix trait describes an N-dimensional square matrix of Float type that operates on a Vector.
This trait is not stable.
Such SqMatrix support basic arithmetic using addition and subtraction, and they provide component-wise multiplication and division, using the standard operators on two SqMatrixs.
They also support basic arithmetic to all components of the
SqMatrix for addition, subtraction, multiplication and division by
a scalar Float value type that they are comprised of. Hence a
m:SqMatrix<F>
may be scaled by a s:F
using m * s
.
Required methods
fn determinant(&self) -> F
fn determinant(&self) -> F
Calculate the determinant of the matrix