pub struct Array2<T> { /* private fields */ }Expand description
Lightweight row-major 2D array used by grid-oriented helper crates.
Implementations§
Source§impl<T> Array2<T>
impl<T> Array2<T>
pub fn from_shape_vec( shape: (usize, usize), data: Vec<T>, ) -> Result<Self, String>
pub fn dim(&self) -> (usize, usize)
pub fn nrows(&self) -> usize
pub fn ncols(&self) -> usize
pub fn shape(&self) -> [usize; 2]
pub fn as_slice(&self) -> &[T]
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
Trait Implementations§
impl<T> StructuralPartialEq for Array2<T>
Auto Trait Implementations§
impl<T> Freeze for Array2<T>
impl<T> RefUnwindSafe for Array2<T>where
T: RefUnwindSafe,
impl<T> Send for Array2<T>where
T: Send,
impl<T> Sync for Array2<T>where
T: Sync,
impl<T> Unpin for Array2<T>where
T: Unpin,
impl<T> UnsafeUnpin for Array2<T>
impl<T> UnwindSafe for Array2<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more