pub enum PointKind {
Barycentric,
Centroid,
Root,
Third,
Fifth,
}Expand description
Enumerates the different kinds of points considered by the system
- Barycentric (critical points): points defining a barycentric coordinate for the facet
Variants§
Barycentric
the topology of a 2-simplex naturally defines a maximum of three barycentric coordinates which are used to define the three critical points of the network
Centroid
the centroid is the geometric center of the triad, defined as the average of the three vertices
Root
the root (tonic) of the facet
Third
the middle vertex (note) of the facet
Fifth
the final vertex (note) of the facet
Implementations§
Source§impl PointKind
impl PointKind
Sourcepub const fn is_barycentric(&self) -> bool
pub const fn is_barycentric(&self) -> bool
Returns true if the enum is PointKind::Barycentric otherwise false
Sourcepub const fn is_centroid(&self) -> bool
pub const fn is_centroid(&self) -> bool
Returns true if the enum is PointKind::Centroid otherwise false
Sourcepub const fn is_root(&self) -> bool
pub const fn is_root(&self) -> bool
Returns true if the enum is PointKind::Root otherwise false
Source§impl PointKind
impl PointKind
Sourcepub fn default_coordinates<T>(&self) -> [T; 3]where
T: Float + FromPrimitive,
pub fn default_coordinates<T>(&self) -> [T; 3]where
T: Float + FromPrimitive,
Get default barycentric coordinates for this kind
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PointKind
impl<'de> Deserialize<'de> for PointKind
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoEnumIterator for PointKind
impl IntoEnumIterator for PointKind
type Iterator = PointKindIter
fn iter() -> PointKindIter ⓘ
Source§impl Ord for PointKind
impl Ord for PointKind
Source§impl PartialOrd for PointKind
impl PartialOrd for PointKind
Source§impl VariantNames for PointKind
impl VariantNames for PointKind
impl Copy for PointKind
impl Eq for PointKind
impl StructuralPartialEq for PointKind
Auto Trait Implementations§
impl Freeze for PointKind
impl RefUnwindSafe for PointKind
impl Send for PointKind
impl Sync for PointKind
impl Unpin for PointKind
impl UnwindSafe for PointKind
Blanket Implementations§
Source§impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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
Compare self to
key and return true if they are equal.Source§impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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 moreSource§impl<T> IntoWeight<T> for T
impl<T> IntoWeight<T> for T
fn into_weight(self) -> Weight<T>
Source§impl<A, B, C> PercentDifference<B> for A
impl<A, B, C> PercentDifference<B> for A
type Output = C
Source§fn percent_diff(self, rhs: B) -> <A as PercentDifference<B>>::Output
fn percent_diff(self, rhs: B) -> <A as PercentDifference<B>>::Output
Computes the percent difference between two values.