pub enum KmeansReject {
Show 14 variants
NoLoop,
NoAssignment,
NoDistance,
UnsupportedTerm,
NotInt,
NonAffineIndex,
NotRowLayout,
NoArgmin,
NoAccumulation,
NoUpdate,
NotZeroed,
NotFromFirstPoints,
NotCounted,
ExtraWork,
}Expand description
Why a program is not a recognizable k-means clustering, least to most advanced.
Variants§
NoLoop
No While counter is less than BOUND loop.
NoAssignment
No loop over the points whose body finds each point’s nearest centroid: a loop over the centroids around a loop over the features.
NoDistance
The loop over the features does not add a term into one register.
UnsupportedTerm
The distance term reads something other than the point’s and the centroid’s feature and constants, uses an operator or calls a function a term does not have, or is ill-typed.
NotInt
A distance, but not an Int over Int arrays — the integer clustering the app computes.
NonAffineIndex
An index is not affine in the counters.
NotRowLayout
A read that is not the point’s or the centroid’s feature, row-major (row · f + feature).
NoArgmin
The loop over the centroids does not keep the nearest one (If c is 0 or dist is at most bestDist: setting
best to c and bestDist to dist).
NoAccumulation
The point is not added to its nearest centroid’s row of sums and counted once.
NoUpdate
No loop over the centroids setting each to its sum over its count, or to 0 when it has no points.
NotZeroed
The sums and counts are not set to zero at the start of every epoch.
NotFromFirstPoints
The centroids do not start as the first k points.
NotCounted
A counter not set to a constant right before its loop, or not stepped by exactly one.
ExtraWork
A loop body does more than the clustering.
Trait Implementations§
Source§impl Clone for KmeansReject
impl Clone for KmeansReject
Source§fn clone(&self) -> KmeansReject
fn clone(&self) -> KmeansReject
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KmeansReject
impl Debug for KmeansReject
Source§impl Ord for KmeansReject
impl Ord for KmeansReject
Source§fn cmp(&self, other: &KmeansReject) -> Ordering
fn cmp(&self, other: &KmeansReject) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for KmeansReject
impl PartialEq for KmeansReject
Source§impl PartialOrd for KmeansReject
impl PartialOrd for KmeansReject
impl Copy for KmeansReject
impl Eq for KmeansReject
impl StructuralPartialEq for KmeansReject
Auto Trait Implementations§
impl Freeze for KmeansReject
impl RefUnwindSafe for KmeansReject
impl Send for KmeansReject
impl Sync for KmeansReject
impl Unpin for KmeansReject
impl UnsafeUnpin for KmeansReject
impl UnwindSafe for KmeansReject
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.