pub struct KmeansFlags(/* private fields */);Expand description
k-means flags
Implementations§
Source§impl KmeansFlags
impl KmeansFlags
Sourcepub const KMEANS_RANDOM_CENTERS: Self
pub const KMEANS_RANDOM_CENTERS: Self
Select random initial centers in each attempt.
Sourcepub const KMEANS_PP_CENTERS: Self
pub const KMEANS_PP_CENTERS: Self
Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007].
Sourcepub const KMEANS_USE_INITIAL_LABELS: Self
pub const KMEANS_USE_INITIAL_LABELS: Self
During the first (and possibly the only) attempt, use the user-supplied labels instead of computing them from the initial centers. For the second and further attempts, use the random or semi-random centers. Use one of KMEANS_*_CENTERS flag to specify the exact method.
Trait Implementations§
Source§impl Clone for KmeansFlags
impl Clone for KmeansFlags
Source§fn clone(&self) -> KmeansFlags
fn clone(&self) -> KmeansFlags
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KmeansFlags
Source§impl Debug for KmeansFlags
impl Debug for KmeansFlags
impl Eq for KmeansFlags
Source§impl From<KmeansFlags> for i32
impl From<KmeansFlags> for i32
Source§fn from(v: KmeansFlags) -> Self
fn from(v: KmeansFlags) -> Self
Converts to this type from the input type.
Source§impl OpenCVBitfieldEnum for KmeansFlags
impl OpenCVBitfieldEnum for KmeansFlags
Source§const ALL_FLAGS: &'static [Self]
const ALL_FLAGS: &'static [Self]
List of all valid separate flags for this enum, mostly for internal use
Source§unsafe fn from_i32_unchecked(value: i32) -> Self
unsafe fn from_i32_unchecked(value: i32) -> Self
Construct the enum from an
i32 value without checking its validity Read moreSource§fn try_from_i32(value: i32) -> Result<Self>
fn try_from_i32(value: i32) -> Result<Self>
Construct the enum from an
i32 value, returning an error if any of the set bits do not have associated flagsSource§impl PartialEq for KmeansFlags
impl PartialEq for KmeansFlags
impl StructuralPartialEq for KmeansFlags
Auto Trait Implementations§
impl Freeze for KmeansFlags
impl RefUnwindSafe for KmeansFlags
impl Send for KmeansFlags
impl Sync for KmeansFlags
impl Unpin for KmeansFlags
impl UnsafeUnpin for KmeansFlags
impl UnwindSafe for KmeansFlags
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