Struct n_array::NArray [] [src]

pub struct NArray<T> {
    // some fields omitted
}

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.

Methods

impl<T> NArray<T>
[src]

fn from_function<F>(dim: usize, mag: &[usize], func: F) -> Self where F: Fn(&[usize]) -> T

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

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

fn new(dim: usize, mag: &[usize]) -> Self

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]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

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

type Output = T

The returned type after indexing

fn index(&self, index: S) -> &Self::Output

The method for the indexing (Foo[Bar]) operation

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

fn index_mut(&mut self, index: S) -> &mut Self::Output

The method for the indexing (Foo[Bar]) operation

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

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more