Struct rds::array::NDSliceMut
[−]
[src]
pub struct NDSliceMut<'a, T: 'a> { /* fields omitted */ }
Structure representing an mutable borrow of a n-dimensional array sub slice.
Trait Implementations
impl<'a, T> NDData<T> for NDSliceMut<'a, T>
[src]
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. Read more
fn strides(&self) -> &[usize]
Return a slice of length N where each element is the stride of the dimension.
fn get_data(&self) -> &[T]
Return the underlying storage array as a slice.
fn dim(&self) -> usize
Return N, the number of dimensions.
fn size(&self) -> usize
Return the total number of element of the N-dimensional array.
fn idx<'a>(&'a self, idx: &[usize]) -> &'a T
Take a slice of length N representing an N-dimensional index in the array and return a reference to the element at this position. Read more
impl<'a, T: Clone + Display> NDDataMut<T> for NDSliceMut<'a, T>
[src]
fn get_data_mut(&mut self) -> &mut [T]
Return the underlying storage array as a mutable slice.
fn idx_mut<'a>(&'a mut self, idx: &[usize]) -> &'a mut T
Take a slice of length N representing an -index in the array and return a mutable reference to the element at this position. Read more
fn transpose(&mut self)
Perform a generic transpose. All the dimensions need to be the same.
fn assign(&mut self, other: &NDData<T>)
Assign another NDData to the NDDataMut. The shapes need to be identical.
impl<'a, T: 'a> NDSliceable<'a, T> for NDSliceMut<'a, T>
[src]
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. Read more
impl<'a, T: 'a> NDSliceableMut<'a, T> for NDSliceMut<'a, T>
[src]
fn slice_mut(&'a mut self, idx: &[usize]) -> NDSliceMut<'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. Read more
impl<'a, 'b, T> Index<&'b [usize]> for NDSliceMut<'a, T>
[src]
type Output = T
The returned type after indexing
fn index<'c>(&'c self, idx: &'b [usize]) -> &'c T
The method for the indexing (container[index]
) operation
impl<'a, 'b, T> Index<&'b [usize; 1]> for NDSliceMut<'a, T>
[src]
type Output = T
The returned type after indexing
fn index<'c>(&'c self, idx: &'b [usize; 1]) -> &'c T
The method for the indexing (container[index]
) operation
impl<'a, 'b, T> Index<&'b [usize; 2]> for NDSliceMut<'a, T>
[src]
type Output = T
The returned type after indexing
fn index<'c>(&'c self, idx: &'b [usize; 2]) -> &'c T
The method for the indexing (container[index]
) operation
impl<'a, 'b, T> Index<&'b [usize; 3]> for NDSliceMut<'a, T>
[src]
type Output = T
The returned type after indexing
fn index<'c>(&'c self, idx: &'b [usize; 3]) -> &'c T
The method for the indexing (container[index]
) operation
impl<'a, 'b, T: Clone + Display> IndexMut<&'b [usize]> for NDSliceMut<'a, T>
[src]
fn index_mut<'c>(&'c mut self, idx: &[usize]) -> &'c mut T
The method for the mutable indexing (container[index]
) operation
impl<'a, 'b, T: Clone + Display> IndexMut<&'b [usize; 1]> for NDSliceMut<'a, T>
[src]
fn index_mut<'c>(&'c mut self, idx: &'b [usize; 1]) -> &'c mut T
The method for the mutable indexing (container[index]
) operation
impl<'a, 'b, T: Clone + Display> IndexMut<&'b [usize; 2]> for NDSliceMut<'a, T>
[src]
fn index_mut<'c>(&'c mut self, idx: &'b [usize; 2]) -> &'c mut T
The method for the mutable indexing (container[index]
) operation
impl<'a, 'b, T: Clone + Display> IndexMut<&'b [usize; 3]> for NDSliceMut<'a, T>
[src]
fn index_mut<'c>(&'c mut self, idx: &'b [usize; 3]) -> &'c mut T
The method for the mutable indexing (container[index]
) operation
impl<'a, T: PartialEq, O: NDData<T> + Sized> PartialEq<O> for NDSliceMut<'a, T>
[src]
fn eq(&self, other: &O) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a, T: Eq> Eq for NDSliceMut<'a, T>
[src]
impl<'a, 'b, T: Clone + Display + From<f32>, R: NDData<T> + Sized> AddAssign<&'a R> for NDSliceMut<'b, T> where
NDSliceMut<'b, T>: Blas<T>,
[src]
NDSliceMut<'b, T>: Blas<T>,
fn add_assign(&mut self, rhs: &'a R)
The method for the +=
operator
impl<'a, 'b, 'c, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Add<&'a R> for &'b NDSliceMut<'c, T> where
NDArray<T>: Blas<T>,
[src]
NDArray<T>: Blas<T>,
type Output = NDArray<T>
The resulting type after applying the +
operator
fn add(self, rhs: &'a R) -> NDArray<T>
The method for the +
operator
impl<'a, 'b, T: Clone + Display + From<f32>, R: NDData<T> + Sized> SubAssign<&'a R> for NDSliceMut<'b, T> where
NDSliceMut<'b, T>: Blas<T>,
[src]
NDSliceMut<'b, T>: Blas<T>,
fn sub_assign(&mut self, rhs: &'a R)
The method for the -=
operator
impl<'a, 'b, 'c, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Sub<&'a R> for &'b NDSliceMut<'c, T> where
NDArray<T>: Blas<T>,
[src]
NDArray<T>: Blas<T>,
type Output = NDArray<T>
The resulting type after applying the -
operator
fn sub(self, rhs: &'a R) -> NDArray<T>
The method for the -
operator
impl<'a, 'b, T: Clone + Display + From<f32>, I: NDData<T> + Sized> MulAssign<&'b I> for NDSliceMut<'a, T> where
NDSliceMut<'a, T>: Blas<T> + NDData<T>,
[src]
NDSliceMut<'a, T>: Blas<T> + NDData<T>,
fn mul_assign(&mut self, rhs: &'b I)
The method for the *=
operator
impl<'a, 'b, 'c, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Mul<&'a R> for &'b NDSliceMut<'c, T> where
NDArray<T>: Blas<T>,
[src]
NDArray<T>: Blas<T>,
type Output = NDArray<T>
The resulting type after applying the *
operator
fn mul(self, rhs: &'a R) -> NDArray<T>
The method for the *
operator
impl<'a, T> SizedBuffer for NDSliceMut<'a, T>
[src]
unsafe fn get_raw_ptr(&self) -> *const c_void
fn get_raw_size(&self) -> usize
impl<'a, T: Clone + Display> SizedBufferMut for NDSliceMut<'a, T> where
NDSliceMut<'a, T>: SizedBuffer,
[src]
NDSliceMut<'a, T>: SizedBuffer,