pub struct Matrix<const R: usize, const C: usize>(_);Implementations§
source§impl<const R: usize, const C: usize> Matrix<R, C>
impl<const R: usize, const C: usize> Matrix<R, C>
pub fn new(closure: impl Fn(usize, usize) -> f32) -> Self
pub fn zero() -> Self
pub const fn is_square(&self) -> bool
pub fn rows(&self) -> [[f32; C]; R]
pub fn columns(&self) -> [[f32; R]; C]
pub fn transpose(&self) -> Matrix<C, R>
pub fn map<F>(&self, f: F) -> Selfwhere F: Fn(f32) -> f32,
pub fn merge<F>(&self, other: Matrix<R, C>, f: F) -> Selfwhere F: Fn(f32, f32) -> f32,
Trait Implementations§
source§impl<const R: usize, const C: usize> PartialEq<Matrix<R, C>> for Matrix<R, C>
impl<const R: usize, const C: usize> PartialEq<Matrix<R, C>> for Matrix<R, C>
impl<const R: usize, const C: usize> Copy for Matrix<R, C>
impl<const R: usize, const C: usize> StructuralPartialEq for Matrix<R, C>
Auto Trait Implementations§
impl<const R: usize, const C: usize> RefUnwindSafe for Matrix<R, C>
impl<const R: usize, const C: usize> Send for Matrix<R, C>
impl<const R: usize, const C: usize> Sync for Matrix<R, C>
impl<const R: usize, const C: usize> Unpin for Matrix<R, C>
impl<const R: usize, const C: usize> UnwindSafe for Matrix<R, C>
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