pub struct Matrix<T> {
pub n: usize,
pub m: usize,
/* private fields */
}
Fields§
§n: usize
§m: usize
Implementations§
Source§impl<T: Float + Zero + From<f32>> Matrix<T>
impl<T: Float + Zero + From<f32>> Matrix<T>
pub fn new(val: f32, n: usize, m: usize) -> Matrix<T>
pub fn zeros(n: usize, m: usize) -> Matrix<T>
pub fn identity(n: usize) -> Matrix<T>
pub fn piece_mult( _lhs: Matrix<T>, _rhs: Matrix<T>, ) -> Result<Matrix<T>, MatrixError>
pub fn get_row(&self, row: usize) -> &[T]
pub fn get_col(&self, col: usize) -> Vec<T>
pub fn transpose(&self) -> Matrix<T>
pub fn exp(&mut self) -> Matrix<T>
pub fn one_over(&self) -> Matrix<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Matrix<T>
impl<T> RefUnwindSafe for Matrix<T>where
T: RefUnwindSafe,
impl<T> Send for Matrix<T>where
T: Send,
impl<T> Sync for Matrix<T>where
T: Sync,
impl<T> Unpin for Matrix<T>where
T: Unpin,
impl<T> UnwindSafe for Matrix<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