pub struct Cloud<const N: usize, F: Field> { /* private fields */ }Expand description
Defines the Cloud struct, representing a collection of points (vectors)
in an N-dimensional space.
This module provides the Cloud type, which can be used to store and
manage a set of points. It implements traits for basic collection operations,
as well as for metric and normed space concepts, allowing for calculations
like distance and norm.
A Cloud is essentially a set of vectors, providing basic Collection operations
as well as metric and normed space functionalities.
Implementations§
Source§impl<F: Field, const N: usize> Cloud<N, F>
impl<F: Field, const N: usize> Cloud<N, F>
Sourcepub const fn new(points: Vec<FixedVector<N, F>>) -> Self
pub const fn new(points: Vec<FixedVector<N, F>>) -> Self
Creates a new Cloud from a given set of points.
§Arguments
points: AHashSetofVector<N, F>representing the points in the cloud.
Sourcepub const fn points_ref(&self) -> &Vec<FixedVector<N, F>>
pub const fn points_ref(&self) -> &Vec<FixedVector<N, F>>
Returns a reference to the points in the cloud.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize, F> Freeze for Cloud<N, F>
impl<const N: usize, F> RefUnwindSafe for Cloud<N, F>where
F: RefUnwindSafe,
impl<const N: usize, F> Send for Cloud<N, F>where
F: Send,
impl<const N: usize, F> Sync for Cloud<N, F>where
F: Sync,
impl<const N: usize, F> Unpin for Cloud<N, F>where
F: Unpin,
impl<const N: usize, F> UnwindSafe for Cloud<N, F>where
F: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more