pub struct Mat { /* private fields */ }Implementations§
Source§impl Mat
impl Mat
pub fn zeros(rows: usize, cols: usize) -> Self
pub fn identity(n: usize) -> Self
pub fn from_vec(rows: usize, cols: usize, data: Vec<f64>) -> Self
pub fn rows(&self) -> usize
pub fn cols(&self) -> usize
pub fn row(&self, r: usize) -> &[f64]
pub fn row_mut(&mut self, r: usize) -> &mut [f64]
pub fn as_slice(&self) -> &[f64]
pub fn transpose(&self) -> Self
pub fn matmul(&self, b: &Self) -> Self
pub fn mul_vec(&self, v: &[f64]) -> Vec<f64>
pub fn gram(&self) -> Self
pub fn t_mul_vec(&self, v: &[f64]) -> Vec<f64>
Trait Implementations§
impl StructuralPartialEq for Mat
Auto Trait Implementations§
impl Freeze for Mat
impl RefUnwindSafe for Mat
impl Send for Mat
impl Sync for Mat
impl Unpin for Mat
impl UnsafeUnpin for Mat
impl UnwindSafe for Mat
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