pub struct NDSlice<'a, T: 'a> { /* private fields */ }
Expand description
Structure representing an immutable borrow of a n-dimensional array sub slice.
Trait Implementations§
Source§impl<'a, 'b, 'c, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Add<&'a R> for &'b NDSlice<'c, T>
impl<'a, 'b, 'c, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Add<&'a R> for &'b NDSlice<'c, T>
Source§impl<'a, 'b, 'c, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Mul<&'a R> for &'b NDSlice<'c, T>
impl<'a, 'b, 'c, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Mul<&'a R> for &'b NDSlice<'c, T>
Source§impl<'a, T> NDData<T> for NDSlice<'a, T>
impl<'a, T> NDData<T> for NDSlice<'a, T>
Source§fn shape(&self) -> &[usize]
fn shape(&self) -> &[usize]
Return a slice of length N where each element is the length of the dimension.
For a 2 dimensional matrix, the first dimension is the number of rows and the second
dimension is the number of columns.
Source§impl<'a, T: 'a> NDSliceable<'a, T> for NDSlice<'a, T>
impl<'a, T: 'a> NDSliceable<'a, T> for NDSlice<'a, T>
Source§fn slice(&'a self, idx: &[usize]) -> NDSlice<'a, T>
fn slice(&'a self, idx: &[usize]) -> NDSlice<'a, T>
Take a slice of length < N representing the sub slice index and return immutable borrow of
the sub slice as an NDSlice.
Because the storage is in row-major order and the slice need to be contiguous in the
underlying storage array it means, for example, only the rows of a matrix can be borrowed.
Source§impl<'a, T> SizedBuffer for NDSlice<'a, T>
impl<'a, T> SizedBuffer for NDSlice<'a, T>
unsafe fn get_raw_ptr(&self) -> *const c_void
fn get_raw_size(&self) -> usize
Source§impl<'a, 'b, 'c, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Sub<&'a R> for &'b NDSlice<'c, T>
impl<'a, 'b, 'c, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Sub<&'a R> for &'b NDSlice<'c, T>
impl<'a, T: Eq> Eq for NDSlice<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for NDSlice<'a, T>
impl<'a, T> RefUnwindSafe for NDSlice<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for NDSlice<'a, T>where
T: Sync,
impl<'a, T> Sync for NDSlice<'a, T>where
T: Sync,
impl<'a, T> Unpin for NDSlice<'a, T>
impl<'a, T> UnwindSafe for NDSlice<'a, T>where
T: RefUnwindSafe,
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