pub struct Matrix { /* private fields */ }Implementations§
Source§impl Matrix
impl Matrix
pub fn new(rows: usize, cols: usize) -> Self
pub fn from_slice(data: &[f64], rows: usize, cols: usize) -> Self
pub fn identity(size: usize) -> Self
pub fn random(rows: usize, cols: usize) -> Self
pub fn rows(&self) -> usize
pub fn cols(&self) -> usize
pub fn data(&self) -> &[f64]
pub fn data_mut(&mut self) -> &mut [f64]
pub fn get(&self, row: usize, col: usize) -> f64
pub fn set(&mut self, row: usize, col: usize, value: f64)
pub fn multiply(&self, other: &Matrix) -> Result<Matrix, String>
pub fn transpose(&self) -> Matrix
pub fn is_symmetric(&self) -> bool
pub fn is_positive_definite(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Matrix
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnwindSafe for Matrix
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