pub struct DMatrix<T = f64> { /* private fields */ }Expand description
Dense matrix / vector types re-exported from the tpt-math substrate so
callers can consume assembled operators without a separate dependency.
A dynamically-sized matrix of T, stored column-major in a contiguous Vec
((i, j) lives at i + j * nrows).
Implementations§
Source§impl<T> DMatrix<T>
impl<T> DMatrix<T>
Sourcepub fn zeros(nrows: usize, ncols: usize) -> DMatrix<T>where
T: Scalar,
pub fn zeros(nrows: usize, ncols: usize) -> DMatrix<T>where
T: Scalar,
A zero matrix of the given shape.
Sourcepub fn from_vec(nrows: usize, ncols: usize, data: Vec<T>) -> DMatrix<T>
pub fn from_vec(nrows: usize, ncols: usize, data: Vec<T>) -> DMatrix<T>
Build from a Vec laid out column-major: element (i, j) is
data[i + j * nrows].
Sourcepub fn from_row_slice(nrows: usize, ncols: usize, data: &[T]) -> DMatrix<T>where
T: Clone,
pub fn from_row_slice(nrows: usize, ncols: usize, data: &[T]) -> DMatrix<T>where
T: Clone,
Build from a slice laid out row-major.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for DMatrix<T>
impl<T> RefUnwindSafe for DMatrix<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for DMatrix<T>
impl<T> Sync for DMatrix<T>
impl<T> Unpin for DMatrix<T>
impl<T> UnsafeUnpin for DMatrix<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for DMatrix<T>where
Vec<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