pub struct Point<T = f32> { /* private fields */ }Expand description
Critical point within the surface of a triadic space
Implementations§
Source§impl<T> Point<T>
impl<T> Point<T>
pub fn new(u: T, v: T, modulus: Octave<isize>, kind: PointKind) -> Self
Sourcepub fn from_triad(kind: PointKind, triad: &Triad) -> Selfwhere
T: Float + FromPrimitive,
pub fn from_triad(kind: PointKind, triad: &Triad) -> Selfwhere
T: Float + FromPrimitive,
Create a new critical point with coordinates adjusted for the triad class
Sourcepub const fn coordinates(&self) -> &[T; 3]
pub const fn coordinates(&self) -> &[T; 3]
returns an immutable reference to the coordinates of the critical point
Sourcepub fn coordinates_mut(&mut self) -> &mut [T; 3]
pub fn coordinates_mut(&mut self) -> &mut [T; 3]
returns an mutable reference to the coordinates of the critical point
Sourcepub const fn modulus(&self) -> &Octave
pub const fn modulus(&self) -> &Octave
returns an immutable reference to the critical points octave
Sourcepub fn modulus_mut(&mut self) -> &mut Octave
pub fn modulus_mut(&mut self) -> &mut Octave
returns a mutable reference to the critical points octave
Sourcepub const fn weight(&self) -> &T
pub const fn weight(&self) -> &T
returns an immutable reference to the weight of the critical point
Sourcepub fn weight_mut(&mut self) -> &mut T
pub fn weight_mut(&mut self) -> &mut T
returns a mutable reference to the weight of the critical point
Sourcepub fn set_coordinates(&mut self, u: T, v: T)
pub fn set_coordinates(&mut self, u: T, v: T)
set the coordinates of the critical point
Sourcepub fn set_weight(&mut self, weight: T)
pub fn set_weight(&mut self, weight: T)
set the weight of the critical point
Sourcepub fn with_coordinates(self, u: T, v: T) -> Self
pub fn with_coordinates(self, u: T, v: T) -> Self
consumes the current instance to create another with the given coordinates
Sourcepub fn with_kind(self, kind: PointKind) -> Self
pub fn with_kind(self, kind: PointKind) -> Self
consumes the current instance to create another with the given name
Sourcepub fn with_modulus(self, modulus: Octave) -> Self
pub fn with_modulus(self, modulus: Octave) -> Self
consumes the current instance to create another with the given modulus
Sourcepub fn with_weight(self, weight: T) -> Self
pub fn with_weight(self, weight: T) -> Self
consumes the current instance to create another with the given weight
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Point<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Point<T>where
T: Deserialize<'de>,
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<T: Ord> Ord for Point<T>
impl<T: Ord> Ord for Point<T>
Source§impl<T: PartialOrd> PartialOrd for Point<T>
impl<T: PartialOrd> PartialOrd for Point<T>
impl<T: Copy> Copy for Point<T>
impl<T: Eq> Eq for Point<T>
impl<T> StructuralPartialEq for Point<T>
Auto Trait Implementations§
impl<T> Freeze for Point<T>where
T: Freeze,
impl<T> RefUnwindSafe for Point<T>where
T: RefUnwindSafe,
impl<T> Send for Point<T>where
T: Send,
impl<T> Sync for Point<T>where
T: Sync,
impl<T> Unpin for Point<T>where
T: Unpin,
impl<T> UnwindSafe for Point<T>where
T: UnwindSafe,
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
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
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>
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