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]
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