Struct kodama::LinkageState

source ·
pub struct LinkageState<T> { /* private fields */ }
Expand description

Mutable scratch space used by the linkage algorithms.

LinkageState is an opaque representation of mutable scratch space used by the linkage algorithms. It is provided only for callers who wish to amortize allocation using the with variants of the clustering functions. This may be useful when your requirements call for rapidly running hierarchical clustering on small dissimilarity matrices.

The memory used by LinkageState is proportional to the number of observations being clustered.

The T type parameter refers to the type of dissimilarity used in the pairwise matrix. In practice, T is a floating point type.

Implementations§

Create a new mutable scratch space for use in the with variants of the clustering functions.

The clustering functions will automatically resize the scratch space as needed based on the number of observations being clustered.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.