pub struct Simplex<const N: usize> {
pub neighbours: [usize; N],
pub vertices: [usize; N],
}Expand description
Euclidean (N-1)-simplex, built from N vertices.
The intended neighbours and vertices ordering is such that the vertex corresponding
to a neighbouring simplex is the vertex opposite the simplex. Additionally the overall
ordering is supposed to be consistent, such that the simplices are oriented.
Fields§
§neighbours: [usize; N]§vertices: [usize; N]Implementations§
Source§impl<const N: usize> Simplex<N>
Methods for working with Simplex<N> when neighbours are encoded by half-faces,
see Triangulation
impl<const N: usize> Simplex<N>
Methods for working with Simplex<N> when neighbours are encoded by half-faces,
see Triangulation
Sourcepub fn get_neighbour(&self, index: usize) -> usize
pub fn get_neighbour(&self, index: usize) -> usize
Returns the label of the neighbouring (N-1)-simplex on the index side.
§Panic
This method will panic index >= N
Sourcepub fn get_neighbour_backindex(&self, index: usize) -> (usize, usize)
pub fn get_neighbour_backindex(&self, index: usize) -> (usize, usize)
Returns the label and backindex of neighbouring (N-1)-simplex on the index side.
§Panic
This method will panic index >= N
Sourcepub fn get_neighbours(&self) -> [usize; N]
pub fn get_neighbours(&self) -> [usize; N]
Returns the neighbouring (N-1)-simplex labels of the Simplex
Sourcepub fn get_neighbours_backindices(&self) -> [(usize, usize); N]
pub fn get_neighbours_backindices(&self) -> [(usize, usize); N]
Returns the neighbouring (N-1)-simplex labels and back indices in tuple pairs
Trait Implementations§
Source§impl<'de, const N: usize> Deserialize<'de> for Simplex<N>
impl<'de, const N: usize> Deserialize<'de> for Simplex<N>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<K, const N: usize> From<CausalSimplex<K, N>> for Simplex<N>
impl<K, const N: usize> From<CausalSimplex<K, N>> for Simplex<N>
Source§fn from(value: CausalSimplex<K, N>) -> Self
fn from(value: CausalSimplex<K, N>) -> Self
Convert CausalSimplex to Simplex by simply dropping time and kind information.
impl<const N: usize> Copy for Simplex<N>
impl<const N: usize> Eq for Simplex<N>
impl<const N: usize> StructuralPartialEq for Simplex<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Simplex<N>
impl<const N: usize> RefUnwindSafe for Simplex<N>
impl<const N: usize> Send for Simplex<N>
impl<const N: usize> Sync for Simplex<N>
impl<const N: usize> Unpin for Simplex<N>
impl<const N: usize> UnwindSafe for Simplex<N>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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