Skip to main content

Grid

Struct Grid 

Source
pub struct Grid<const D: usize, T> { /* private fields */ }

Implementations§

Source§

impl<V: Copy + Eq + Hash> Grid<2, V>

Source

pub fn defeature(self, minimum: usize) -> Self

Source§

impl<V: Copy + Eq + Hash> Grid<3, V>

Source

pub fn defeature(self, minimum: usize) -> Self

Source§

impl Grid<3, usize>

Source

pub fn from_finite_elements(mesh: &Mesh<3>, size: f64) -> Self

Source§

impl Grid<3, usize>

Source

pub fn from_tessellation(tessellation: &Tessellation, size: f64) -> Self

Source§

impl<const D: usize, T> Grid<D, T>

Source

pub fn new(data: Vec<T>, nel: [usize; D]) -> Self

Source

pub fn new_row_major(data: Vec<T>, nel: [usize; D]) -> Self

Source

pub fn data(&self) -> &[T]

Source

pub fn flat(&self, index: [usize; D]) -> usize

Source

pub fn logical_iter<'a>( &'a self, ) -> impl Iterator<Item = ([usize; D], &'a T)> + 'a

Source

pub fn nel(&self) -> &[usize; D]

Source

pub fn is_col_major(&self) -> bool

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source§

impl<const D: usize, T: Copy> Grid<D, T>

Source

pub fn data_col_major(&self) -> Cow<'_, [T]>

Source§

impl<const D: usize, T: Copy> Grid<D, T>

Source

pub fn extract(&self, ranges: [Range<usize>; D]) -> Self

Source§

impl<const D: usize, T: PartialEq> Grid<D, T>

Source

pub fn diff(&self, other: &Self) -> Grid<D, u8>

Trait Implementations§

Source§

impl<const D: usize, const L: usize, const M: usize, const N: usize, T, U, V> From<&Orthotree<D, L, M, N, T, U, V>> for Grid<D, V>
where T: Copy + Into<usize>, V: Copy,

Source§

fn from(orthotree: &Orthotree<D, L, M, N, T, U, V>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Grid<3, T>> for Tessellation
where T: Copy + Default + Ord,

Source§

fn from(voxels: Voxels<T>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, T> From<Grid<D, T>> for Segmentation<D, T>

Source§

fn from(grid: Grid<D, T>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, const L: usize, const M: usize, const N: usize, T, U, V> From<Grid<D, V>> for Orthotree<D, L, M, N, T, U, V>
where T: Add<Output = T> + Copy + From<u16> + Into<usize> + Split, U: Copy + From<usize> + Into<usize>, V: Copy + PartialEq,

Source§

fn from(grid: Grid<D, V>) -> Self

Converts to this type from the input type.
Source§

impl<const D: usize, T> Index<[usize; D]> for Grid<D, T>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: [usize; D]) -> &T

Performs the indexing (container[index]) operation. Read more
Source§

impl<const D: usize, T> IndexMut<[usize; D]> for Grid<D, T>

Source§

fn index_mut(&mut self, index: [usize; D]) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<const D: usize, T, P> TryFrom<Input<P>> for Grid<D, T>
where P: AsRef<Path>, T: NpyType + FromStr, <T as FromStr>::Err: Display,

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(input: Input<P>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const D: usize, T, P> Write<Output<P>> for Grid<D, T>
where P: AsRef<Path>, T: NpyType + Display,

Source§

type Error = Error

Source§

fn write(&self, output: Output<P>) -> Result<(), Self::Error>

Auto Trait Implementations§

§

impl<const D: usize, T> Freeze for Grid<D, T>

§

impl<const D: usize, T> RefUnwindSafe for Grid<D, T>
where T: RefUnwindSafe,

§

impl<const D: usize, T> Send for Grid<D, T>
where T: Send,

§

impl<const D: usize, T> Sync for Grid<D, T>
where T: Sync,

§

impl<const D: usize, T> Unpin for Grid<D, T>
where T: Unpin,

§

impl<const D: usize, T> UnsafeUnpin for Grid<D, T>

§

impl<const D: usize, T> UnwindSafe for Grid<D, T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.