Struct rds::array::NDArray [] [src]

pub struct NDArray<T> { /* fields omitted */ }

Structure representing an owned n-dimensional array. The underlying storage is in row-major order.

Methods

impl<T: Clone> NDArray<T>
[src]

Allocate a new array of the specified shape with all elements initialized with the value v.

Allocate a new array which is a copy of data.

Allocate a new array from a row-major order contiguous array and a shape. The size of the shape (product of all its elements) must be equal to the array length.

Allocate a new array where each element has been casted from data.

Reshape this NDArray. The size of the new shape (product of all its elements) must be equal to the size of the current shape.

Insert another NDData of the same dimensionality in this NDArray. The insertion is made at the position pos in the dimension dim. The shape of NDData need to be the same as this NDArray in every dimension except for the insertion dimension.

Extract a sub part of this NDArray as a new NDArray. start and end are two index of the same dimensionality ad this NDArray.

Remove a part of this NDArray. The removal is made in dimension dim from the position start until end (not included). This can be seen as the opposite operation of insert.

Split this NDArray at position pos of dimension dim. The lower indices are kept in dim while the upper indices are returned. This is in fact an extract operation followed by a remove operation.

Trait Implementations

impl<T> NDData<T> for NDArray<T>
[src]

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

Return a slice of length N where each element is the stride of the dimension.

Return the underlying storage array as a slice.

Return N, the number of dimensions.

Return the total number of element of the N-dimensional array.

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<T: Clone + Display> NDDataMut<T> for NDArray<T>
[src]

Return the underlying storage array as a mutable slice.

The transpose function of a NDArray allow to transpose any shape.

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

Assign another NDData to the NDDataMut. The shapes need to be identical.

impl<'a, T: 'a> NDSliceable<'a, T> for NDArray<T>
[src]

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 NDArray<T>
[src]

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<'b, T> Index<&'b [usize]> for NDArray<T>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'b, T> Index<&'b [usize; 1]> for NDArray<T>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'b, T> Index<&'b [usize; 2]> for NDArray<T>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'b, T> Index<&'b [usize; 3]> for NDArray<T>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'b, T: Clone + Display> IndexMut<&'b [usize]> for NDArray<T>
[src]

The method for the mutable indexing (container[index]) operation

impl<'b, T: Clone + Display> IndexMut<&'b [usize; 1]> for NDArray<T>
[src]

The method for the mutable indexing (container[index]) operation

impl<'b, T: Clone + Display> IndexMut<&'b [usize; 2]> for NDArray<T>
[src]

The method for the mutable indexing (container[index]) operation

impl<'b, T: Clone + Display> IndexMut<&'b [usize; 3]> for NDArray<T>
[src]

The method for the mutable indexing (container[index]) operation

impl<T: PartialEq, O: NDData<T> + Sized> PartialEq<O> for NDArray<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq> Eq for NDArray<T>
[src]

impl<'a, T: Clone + Display + From<f32>, R: NDData<T> + Sized> AddAssign<&'a R> for NDArray<T> where
    NDArray<T>: Blas<T>, 
[src]

The method for the += operator

impl<'a, 'b, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Add<&'a R> for &'b NDArray<T> where
    NDArray<T>: Blas<T>, 
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, T: Clone + Display + From<f32>, R: NDData<T> + Sized> SubAssign<&'a R> for NDArray<T> where
    NDArray<T>: Blas<T>, 
[src]

The method for the -= operator

impl<'a, 'b, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Sub<&'a R> for &'b NDArray<T> where
    NDArray<T>: Blas<T>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, T: Clone + Display + From<f32>, I: NDData<T> + Sized> MulAssign<&'a I> for NDArray<T> where
    NDArray<T>: Blas<T> + NDData<T>, 
[src]

The method for the *= operator

impl<'a, 'b, T: Clone + Display + From<f32>, R: NDData<T> + Sized> Mul<&'a R> for &'b NDArray<T> where
    NDArray<T>: Blas<T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<T> SizedBuffer for NDArray<T>
[src]

impl<T: Clone + Display> SizedBufferMut for NDArray<T> where
    NDArray<T>: SizedBuffer
[src]