pub struct MatrixView<'a> { /* private fields */ }Expand description
Immutable row-major matrix view over a slice.
Implementations§
Source§impl<'a> MatrixView<'a>
impl<'a> MatrixView<'a>
Sourcepub fn row_major(data: &'a [f64], rows: usize, cols: usize) -> Result<Self>
pub fn row_major(data: &'a [f64], rows: usize, cols: usize) -> Result<Self>
Creates a validated row-major matrix view.
Sourcepub fn new(
data: &'a [f64],
rows: usize,
cols: usize,
layout: MatrixLayout,
) -> Result<Self>
pub fn new( data: &'a [f64], rows: usize, cols: usize, layout: MatrixLayout, ) -> Result<Self>
Creates a validated matrix view.
Sourcepub fn shape(&self) -> MatrixShape
pub fn shape(&self) -> MatrixShape
Returns the matrix shape.
Sourcepub fn layout(&self) -> MatrixLayout
pub fn layout(&self) -> MatrixLayout
Returns the matrix layout.
Trait Implementations§
Source§impl<'a> Clone for MatrixView<'a>
impl<'a> Clone for MatrixView<'a>
Source§fn clone(&self) -> MatrixView<'a>
fn clone(&self) -> MatrixView<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for MatrixView<'a>
Auto Trait Implementations§
impl<'a> Freeze for MatrixView<'a>
impl<'a> RefUnwindSafe for MatrixView<'a>
impl<'a> Send for MatrixView<'a>
impl<'a> Sync for MatrixView<'a>
impl<'a> Unpin for MatrixView<'a>
impl<'a> UnsafeUnpin for MatrixView<'a>
impl<'a> UnwindSafe for MatrixView<'a>
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
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more