pub struct Vector<S, const N: usize> { /* private fields */ }Implementations§
Source§impl<S: Scalar, const N: usize> Vector<S, N>
impl<S: Scalar, const N: usize> Vector<S, N>
pub fn add(&self, other: &Self) -> Self
pub fn sub(&self, other: &Self) -> Self
pub fn neg(&self) -> Self
Sourcepub fn sharpen(&self) -> Self
pub fn sharpen(&self) -> Self
Componentwise Scalar::sharpen — see that method’s own doc
comment for when collapsing a value to a single representative
point is a safe, free choice (you only ever needed some point
within the interval) versus a silent loss of real uncertainty.
Sourcepub fn interpolate(a: &Self, b: &Self, alpha: S) -> Self
pub fn interpolate(a: &Self, b: &Self, alpha: S) -> Self
Componentwise Scalar::interpolate: a at alpha=0, b at
alpha=1. See that method’s doc comment for why this beats a manual
a*(1-alpha) + b*alpha when components of a/b may coincide.
pub fn prod_scalar(&self, s: S) -> Self
pub fn prod_dot(&self, other: &Self) -> S
pub fn norm_sq(&self) -> S
pub fn norm(&self) -> S
pub fn normalize(&self) -> GeopResult<Self>
Sourcepub fn could_be_equal(&self, other: &Self) -> bool
pub fn could_be_equal(&self, other: &Self) -> bool
True if every component could_be_equal other’s.
Sourcepub fn union(&self, other: &Self) -> Self
pub fn union(&self, other: &Self) -> Self
The componentwise Scalar::union of self and other.
Source§impl<S: Scalar, const N: usize> Vector<S, N>
impl<S: Scalar, const N: usize> Vector<S, N>
pub fn zero() -> Self
Sourcepub fn everything() -> Self
pub fn everything() -> Self
Every component set to Scalar::ENTIRE — could_be_equals any
other vector of the same dimension componentwise.
Trait Implementations§
impl<S: Copy, const N: usize> Copy for Vector<S, N>
Source§impl<S: PartialEq, const N: usize> PartialEq for Vector<S, N>
impl<S: PartialEq, const N: usize> PartialEq for Vector<S, N>
impl<S: PartialEq, const N: usize> StructuralPartialEq for Vector<S, N>
Auto Trait Implementations§
impl<S, const N: usize> Freeze for Vector<S, N>where
S: Freeze,
impl<S, const N: usize> RefUnwindSafe for Vector<S, N>where
S: RefUnwindSafe,
impl<S, const N: usize> Send for Vector<S, N>where
S: Send,
impl<S, const N: usize> Sync for Vector<S, N>where
S: Sync,
impl<S, const N: usize> Unpin for Vector<S, N>where
S: Unpin,
impl<S, const N: usize> UnsafeUnpin for Vector<S, N>where
S: UnsafeUnpin,
impl<S, const N: usize> UnwindSafe for Vector<S, N>where
S: UnwindSafe,
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
Mutably borrows from an owned value. Read more