Struct n_array::NArray [] [src]

pub struct NArray<T> {
    pub dimensions: usize,
    pub magnitudes: Vec<usize>,
    pub data: Vec<T>,
}

An arbitrary n-dimensional array. Dimensions is the number of dimensions, magnitudes contains the size of each dimension, and data contains the data for the array.

Fields

Methods

impl<T> NArray<T>
[src]

Returns a new NArray, with each index populated by a function of it's coordinates.)

impl<T: Default> NArray<T>
[src]

Returns a new NArray, with each index populated by the default for a given type.

Trait Implementations

impl<T: Debug> Debug for NArray<T>
[src]

Formats the value using the given formatter.

impl<T: Clone> Clone for NArray<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T, S: AsRef<[usize]>> Index<S> for NArray<T>
[src]

The returned type after indexing

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

impl<T, S: AsRef<[usize]>> IndexMut<S> for NArray<T>
[src]

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

impl<T> IntoIterator for NArray<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more