[][src]Struct kmeans::KMeansConfigBuilder

pub struct KMeansConfigBuilder<'a, T: Primitive> { /* fields omitted */ }

Implementations

impl<'a, T: Primitive> KMeansConfigBuilder<'a, T>[src]

pub fn init_done(self, init_done: &'a dyn Fn(&KMeansState<T>)) -> Self[src]

Set the callback that should be called after the centroid initialization, before the iteration starts.

pub fn iteration_done(
    self,
    iteration_done: &'a dyn Fn(&KMeansState<T>, usize, T)
) -> Self
[src]

Set the callback that should be called after each iteration during a running k-means calculation.

pub fn random_generator<R: RngCore + 'static>(self, rnd: R) -> Self[src]

Set the random number generator that should be used in the k-means calculation. Use a seeded generator for deterministically repeatable results.

pub fn abort_strategy(self, abort_strategy: AbortStrategy<T>) -> Self[src]

Set the abort-strategy to use during a running k-means calculation. For more information, see documentation of AbortStrategy.

Default

AbortStrategy::NoImprovement { threshold: 0.0005 }

pub fn build(self) -> KMeansConfig<'a, T>[src]

Return the internally built configuration structure.

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for KMeansConfigBuilder<'a, T>

impl<'a, T> !Send for KMeansConfigBuilder<'a, T>

impl<'a, T> !Sync for KMeansConfigBuilder<'a, T>

impl<'a, T> Unpin for KMeansConfigBuilder<'a, T> where
    T: Unpin

impl<'a, T> !UnwindSafe for KMeansConfigBuilder<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> FromCast<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,