pub struct OpticsParams<F, D, N>(/* private fields */);
Implementations§
Source§impl<F: Float, D, N> OpticsParams<F, D, N>
impl<F: Float, D, N> OpticsParams<F, D, N>
pub fn new(min_points: usize, dist_fn: D, nn_algo: N) -> Self
Sourcepub fn tolerance(self, tolerance: F) -> Self
pub fn tolerance(self, tolerance: F) -> Self
Distance between points for them to be considered neighbors. Compared to DBSCAN this parameter isn’t strictly necessary but improves execution time by not considering every point. If the tolerance is too low the distances calculated are undefined and no clusters will be returned.
Trait Implementations§
Source§impl<F: Clone, D: Clone, N: Clone> Clone for OpticsParams<F, D, N>
impl<F: Clone, D: Clone, N: Clone> Clone for OpticsParams<F, D, N>
Source§fn clone(&self) -> OpticsParams<F, D, N>
fn clone(&self) -> OpticsParams<F, D, N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<F: Float, D, N> ParamGuard for OpticsParams<F, D, N>
impl<F: Float, D, N> ParamGuard for OpticsParams<F, D, N>
Source§type Checked = OpticsValidParams<F, D, N>
type Checked = OpticsValidParams<F, D, N>
The checked hyperparameters
Source§type Error = OpticsError
type Error = OpticsError
Error type resulting from failed hyperparameter checking
Source§fn check_ref(&self) -> Result<&Self::Checked, OpticsError>
fn check_ref(&self) -> Result<&Self::Checked, OpticsError>
Checks the hyperparameters and returns a reference to the checked hyperparameters if
successful
Source§fn check(self) -> Result<Self::Checked, OpticsError>
fn check(self) -> Result<Self::Checked, OpticsError>
Checks the hyperparameters and returns the checked hyperparameters if successful
Source§fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
Calls
check()
and unwraps the resultimpl<F, D, N> StructuralPartialEq for OpticsParams<F, D, N>
impl<F: Float, D, N> TransformGuard for OpticsParams<F, D, N>
Auto Trait Implementations§
impl<F, D, N> Freeze for OpticsParams<F, D, N>
impl<F, D, N> RefUnwindSafe for OpticsParams<F, D, N>
impl<F, D, N> Send for OpticsParams<F, D, N>
impl<F, D, N> Sync for OpticsParams<F, D, N>
impl<F, D, N> Unpin for OpticsParams<F, D, N>
impl<F, D, N> UnwindSafe for OpticsParams<F, D, 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
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