Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
Loading...
Searching...
No Matches
clustering::kmeans::SeederStrategy Concept Reference

Contract for the seeder that produces initial centroids for the Lloyd driver. More...

#include <clustering/kmeans/policy/seeder.h>

Concept definition

template<class S, class T>
concept SeederStrategy =
std::default_initializable<S> &&
requires(S &seeder, const NDArray<T, 2> &X, std::size_t k, std::uint64_t seed, math::Pool pool,
NDArray<T, 2> &outCentroids) {
{ seeder.run(X, k, seed, pool, outCentroids) };
}
Represents a multidimensional array (NDArray) of a fixed number of dimensions N and element type T.
Definition ndarray.h:136
Contract for the seeder that produces initial centroids for the Lloyd driver.
Definition seeder.h:23
Thin injection wrapper around a BS::light_thread_pool.
Definition thread.h:63

Detailed Description

Contract for the seeder that produces initial centroids for the Lloyd driver.

The seeder owns its private scratch and writes the k initial centroid rows directly into the caller-provided centroid matrix. No auxiliary output buffers cross the seeder boundary; the Lloyd driver owns its own per-point distance scratch.

Template Parameters
SCandidate seeder policy type.
TElement type of the point cloud.

Definition at line 23 of file seeder.h.