[][src]Struct oxydyze::util::math::grid::Grid

pub struct Grid<T: Default> { /* fields omitted */ }

Methods

impl<T: Copy + Default> Grid<T>[src]

pub fn new(w: usize, h: usize) -> Grid<T>[src]

pub fn from_fn<F: Fn(usize, usize) -> T>(w: usize, h: usize, f: F) -> Grid<T>[src]

pub fn apply<F: Fn(T) -> T>(&self, f: F) -> Grid<T>[src]

pub fn iter(&self) -> Iter<T>[src]

pub fn points_with(
    &self,
    f: &dyn Fn((usize, usize), T) -> bool
) -> Vec<(usize, usize)>
[src]

impl<T: Default + Ord> Grid<T>[src]

pub fn max(&self) -> &T[src]

pub fn min(&self) -> &T[src]

Trait Implementations

impl<T: Clone + Default> Clone for Grid<T>[src]

impl<T: Debug + Default> Debug for Grid<T>[src]

impl<T: Default> Default for Grid<T>[src]

impl<T: Default> Index<[usize; 2]> for Grid<T>[src]

type Output = T

The returned type after indexing.

impl<T: Default> Index<usize> for Grid<T>[src]

type Output = T

The returned type after indexing.

impl<T: Default> IndexMut<[usize; 2]> for Grid<T>[src]

impl<T: Default> IndexMut<usize> for Grid<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Grid<T> where
    T: RefUnwindSafe

impl<T> Send for Grid<T> where
    T: Send

impl<T> Sync for Grid<T> where
    T: Sync

impl<T> Unpin for Grid<T> where
    T: Unpin

impl<T> UnwindSafe for Grid<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<R> Resource for R where
    R: 'static + Any
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.