Struct array3d::Array2d
[−]
[src]
pub struct Array2d<T> { pub shape: V2i, pub data: Vec<T>, }
Fields
shape: V2i
data: Vec<T>
Methods
impl<T: Clone> Array2d<T>
[src]
fn new() -> Self
[src]
fn len(&self) -> usize
[src]
fn linear_index(&self, pos: V2i) -> usize
[src]
fn map_pos<B: Clone, F: Fn(V2i, &T) -> B>(&self, f: F) -> Array2d<B>
[src]
fn from_fn<F: Fn(V2i) -> T>(s: V2i, f: F) -> Array2d<T>
[src]
Trait Implementations
impl<T: Clone> Index<V2i> for Array2d<T>
[src]
type Output = T
The returned type after indexing.
fn index(&self, pos: V2i) -> &T
[src]
Performs the indexing (container[index]
) operation.