[][src]Struct hassium::prelude::Grid2d

pub struct Grid2d<T> { /* fields omitted */ }

Methods

impl<T> Grid2d<T> where
    T: Clone + Send + Sync
[src]

pub fn new(cols: usize, rows: usize, fill: T) -> Grid2d<T>[src]

pub fn with_cells(cols: usize, cells: Vec<T>) -> Grid2d<T>[src]

pub fn resize(&mut self, cols: usize, rows: usize, default: T)[src]

pub fn cols(&self) -> usize[src]

pub fn rows(&self) -> usize[src]

pub fn size(&self) -> (usize, usize)[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

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

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

pub fn cell(&self, col: usize, row: usize) -> Option<&T>[src]

pub fn cell_mut(&mut self, col: usize, row: usize) -> Option<&mut T>[src]

pub fn get(&self, col: usize, row: usize) -> Option<T>[src]

pub fn set(&mut self, col: usize, row: usize, value: T)[src]

pub fn get_col_cells(&self, index: usize) -> Option<Vec<T>>[src]

pub fn get_row_cells(&self, index: usize) -> Option<Vec<T>>[src]

pub fn copy_part(&self, range: Range<(usize, usize)>, result: &mut Grid2d<T>) where
    T: Default
[src]

pub fn get_part(&self, range: Range<(usize, usize)>) -> Grid2d<T>[src]

pub fn get_view(&self, range: Range<(usize, usize)>) -> Grid2d<&T>[src]

pub fn copy_sample(&self, (usize, usize), margin: usize, result: &mut Grid2d<T>) where
    T: Default
[src]

pub fn sample(&self, (usize, usize), margin: usize) -> Grid2d<T>[src]

pub fn view_sample(&self, (usize, usize), margin: usize) -> Grid2d<&T>[src]

pub fn sin_map<F, R>(&self, f: F) -> Grid2d<R> where
    F: FnMut(usize, usize, &T) -> R,
    R: Clone + Send + Sync
[src]

pub fn map<F, R>(&self, f: F) -> Grid2d<R> where
    F: FnMut(usize, usize, &T) -> R + Clone + Send + Sync,
    R: Clone + Send + Sync
[src]

pub fn sin_with<F>(&mut self, f: F) where
    F: FnMut(usize, usize, &T) -> T, 
[src]

pub fn with<F>(&mut self, f: F) where
    F: FnMut(usize, usize, &T) -> T + Clone + Send + Sync
[src]

pub fn iter(&self) -> impl Iterator<Item = &T>[src]

pub fn iter_view(
    &self,
    range: Range<(usize, usize)>
) -> impl Iterator<Item = (usize, usize, &T)>
[src]

pub fn iter_sample(
    &'a self,
    range: Range<(usize, usize)>,
    margin: usize
) -> impl Iterator<Item = (usize, usize, Grid2d<&'a T>)> + 'a
[src]

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T>[src]

pub fn iter_view_mut(
    &mut self,
    range: Range<(usize, usize)>
) -> impl Iterator<Item = (usize, usize, &mut T)>
[src]

pub fn neighbor_sample(&self, (usize, usize)) -> Grid2dNeighborSample<T> where
    T: Default + Copy
[src]

pub fn into_inner(self) -> (usize, usize, Vec<T>)[src]

Trait Implementations

impl<T> Debug for Grid2d<T> where
    T: Debug
[src]

impl<'_, T> Sub<&'_ Grid2d<T>> for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Sub<T, Output = T>, 
[src]

type Output = Result<Grid2d<T>, Grid2dError>

The resulting type after applying the - operator.

impl<'_, T> Mul<&'_ Grid2d<T>> for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Mul<T, Output = T>, 
[src]

type Output = Result<Grid2d<T>, Grid2dError>

The resulting type after applying the * operator.

impl<T> Into<(usize, usize, Vec<T>)> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

impl<T> Into<Vec<T>> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

impl<'_, T> Neg for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Neg<Output = T>, 
[src]

type Output = Grid2d<T>

The resulting type after applying the - operator.

impl<T> Serialize for Grid2d<T> where
    T: Serialize
[src]

impl<T> IntoIterator for Grid2d<T> where
    T: Clone + Send + Sync
[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?

impl<T> Index<(usize, usize)> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

type Output = T

The returned type after indexing.

impl<T> Index<[usize; 2]> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

type Output = T

The returned type after indexing.

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

impl<'_, T> Div<&'_ Grid2d<T>> for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Div<T, Output = T>, 
[src]

type Output = Result<Grid2d<T>, Grid2dError>

The resulting type after applying the / operator.

impl<T> Default for Grid2d<T> where
    T: Default
[src]

impl<'de, T> Deserialize<'de> for Grid2d<T> where
    T: Deserialize<'de>, 
[src]

impl<'_, T> Add<&'_ Grid2d<T>> for &'_ Grid2d<T> where
    T: Clone + Send + Sync + Add<T, Output = T>, 
[src]

type Output = Result<Grid2d<T>, Grid2dError>

The resulting type after applying the + operator.

impl<I, T> From<(usize, I)> for Grid2d<T> where
    I: Iterator<Item = T>,
    T: Clone + Send + Sync
[src]

impl<T> IndexMut<(usize, usize)> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

impl<T> IndexMut<[usize; 2]> for Grid2d<T> where
    T: Clone + Send + Sync
[src]

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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

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.

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

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

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

impl<T> TryDefault for T where
    T: Default

impl<T> Any for T where
    T: Any

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> Erased for T

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> SetParameter for T