pub struct Matrix2<T: PhysicsQuantity> { /* private fields */ }Implementations§
Source§impl<T: PhysicsQuantity> Matrix2<T>
impl<T: PhysicsQuantity> Matrix2<T>
pub fn new(data: [[T; 2]; 2]) -> Self
pub fn zero() -> Self
pub fn from_f64(data: [[f64; 2]; 2]) -> Self
pub fn data(&self) -> [[T; 2]; 2]
pub fn to_f64(&self) -> Matrix2<f64>
pub fn get_column(&self, col: usize) -> Vector2<T>
pub fn get_row(&self, row: usize) -> Vector2<T>
pub fn transpose(&self) -> Matrix2<T>
pub fn frobenius_norm(&self) -> T
pub fn optimize(&mut self)
pub fn abs(&self) -> Self
pub fn to_ndarray(&self) -> Result<Array2<T>, String>
pub fn from_ndarray(array: ArrayView2<'_, T>) -> Result<Self, String>
Source§impl<T: PhysicsQuantity> Matrix2<T>
impl<T: PhysicsQuantity> Matrix2<T>
Source§impl<T, U, V, R> Matrix2<T>where
T: PhysicsQuantity + Mul<T, Output = U> + Mul<U, Output = V> + Div<U, Output = R>,
U: PhysicsQuantity + Mul<T, Output = V>,
V: PhysicsQuantity,
R: PhysicsQuantity,
impl<T, U, V, R> Matrix2<T>where
T: PhysicsQuantity + Mul<T, Output = U> + Mul<U, Output = V> + Div<U, Output = R>,
U: PhysicsQuantity + Mul<T, Output = V>,
V: PhysicsQuantity,
R: PhysicsQuantity,
Trait Implementations§
Source§impl<T: PhysicsQuantity + AddAssign> AddAssign for Matrix2<T>
impl<T: PhysicsQuantity + AddAssign> AddAssign for Matrix2<T>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl<T, U, V> Mul<Matrix2<U>> for Matrix3x2<T>where
T: PhysicsQuantity + Mul<U, Output = V>,
U: PhysicsQuantity,
V: PhysicsQuantity + Add<Output = V>,
impl<T, U, V> Mul<Matrix2<U>> for Matrix3x2<T>where
T: PhysicsQuantity + Mul<U, Output = V>,
U: PhysicsQuantity,
V: PhysicsQuantity + Add<Output = V>,
Source§impl<T, U, V> Mul<Matrix2x3<U>> for Matrix2<T>where
T: PhysicsQuantity + Mul<U, Output = V>,
U: PhysicsQuantity,
V: PhysicsQuantity + Add<Output = V>,
impl<T, U, V> Mul<Matrix2x3<U>> for Matrix2<T>where
T: PhysicsQuantity + Mul<U, Output = V>,
U: PhysicsQuantity,
V: PhysicsQuantity + Add<Output = V>,
Source§impl<T: PhysicsQuantity + SubAssign> SubAssign for Matrix2<T>
impl<T: PhysicsQuantity + SubAssign> SubAssign for Matrix2<T>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl<T: Copy + PhysicsQuantity> Copy for Matrix2<T>
impl<T: PhysicsQuantity> StructuralPartialEq for Matrix2<T>
Auto Trait Implementations§
impl<T> Freeze for Matrix2<T>where
T: Freeze,
impl<T> RefUnwindSafe for Matrix2<T>where
T: RefUnwindSafe,
impl<T> Send for Matrix2<T>where
T: Send,
impl<T> Sync for Matrix2<T>where
T: Sync,
impl<T> Unpin for Matrix2<T>where
T: Unpin,
impl<T> UnsafeUnpin for Matrix2<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Matrix2<T>where
T: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more