DualCellView

Struct DualCellView 

Source
pub struct DualCellView<'a, CellDim, const MESH_DIM: usize> { /* private fields */ }
Expand description

A view into a dual cell’s data.

This type can also be used to index into a dual Cochain of the corresponding dimension in a type-checked fashion. See SimplexView for an example.

Implementations§

Source§

impl<'a, CellDim, const MESH_DIM: usize> DualCellView<'a, CellDim, MESH_DIM>
where CellDim: DimName, Const<MESH_DIM>: DimNameSub<CellDim>,

Source

pub fn index(&self) -> usize

Get the index of this cell in the ordering of dual DIM-cells.

Source

pub fn volume(&self) -> f64

Get the unsigned volume of this cell.

Source

pub fn dual( &self, ) -> SimplexView<'_, DimNameDiff<Const<MESH_DIM>, CellDim>, MESH_DIM>

Get the primal simplex corresponding to this cell.

Trait Implementations§

Source§

impl<'a, CellDim: Clone, const MESH_DIM: usize> Clone for DualCellView<'a, CellDim, MESH_DIM>

Source§

fn clone(&self) -> DualCellView<'a, CellDim, MESH_DIM>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, CellDim: Debug, const MESH_DIM: usize> Debug for DualCellView<'a, CellDim, MESH_DIM>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, D, const MESH_DIM: usize> Index<DualCellView<'a, D, MESH_DIM>> for CochainImpl<D, Dual>
where D: DimName, Const<MESH_DIM>: DimNameSub<D>,

Source§

type Output = f64

The returned type after indexing.
Source§

fn index(&self, simplex: DualCellView<'a, D, MESH_DIM>) -> &Self::Output

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

impl<'a, D, const MESH_DIM: usize> IndexMut<DualCellView<'a, D, MESH_DIM>> for CochainImpl<D, Dual>
where D: DimName, Const<MESH_DIM>: DimNameSub<D>,

Source§

fn index_mut( &mut self, simplex: DualCellView<'a, D, MESH_DIM>, ) -> &mut Self::Output

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

impl<'a, CellDim, const MESH_DIM: usize> PartialEq for DualCellView<'a, CellDim, MESH_DIM>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, CellDim: Copy, const MESH_DIM: usize> Copy for DualCellView<'a, CellDim, MESH_DIM>

Source§

impl<'a, CellDim, const MESH_DIM: usize> Eq for DualCellView<'a, CellDim, MESH_DIM>

Auto Trait Implementations§

§

impl<'a, CellDim, const MESH_DIM: usize> Freeze for DualCellView<'a, CellDim, MESH_DIM>

§

impl<'a, CellDim, const MESH_DIM: usize> !RefUnwindSafe for DualCellView<'a, CellDim, MESH_DIM>

§

impl<'a, CellDim, const MESH_DIM: usize> !Send for DualCellView<'a, CellDim, MESH_DIM>

§

impl<'a, CellDim, const MESH_DIM: usize> !Sync for DualCellView<'a, CellDim, MESH_DIM>

§

impl<'a, CellDim, const MESH_DIM: usize> Unpin for DualCellView<'a, CellDim, MESH_DIM>
where CellDim: Unpin,

§

impl<'a, CellDim, const MESH_DIM: usize> !UnwindSafe for DualCellView<'a, CellDim, MESH_DIM>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,