|
Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
|
#include <citor/cancellation.h>#include <citor/hints.h>#include <citor/thread_pool.h>#include <algorithm>#include <cstddef>#include <cstdint>#include <memory>#include <mutex>#include <span>#include <thread>#include <unordered_map>#include <utility>#include <vector>#include "clustering/math/detail/coherence_cache.h"Go to the source code of this file.
Classes | |
| struct | clustering::math::Pool |
| Thin compile-time-templated wrapper around the underlying OwnedPool. More... | |
Namespaces | |
| namespace | clustering |
| namespace | clustering::math |
Typedefs | |
| using | clustering::math::OwnedPool = citor::ThreadPool |
Type alias for the owning pool the algorithm wrappers (KMeans, DBSCAN, HDBSCAN) hold inside an std::optional. | |
Functions | |
| OwnedPool & | clustering::math::sharedPool (std::size_t nJobs) |
| Process-wide pool registry, keyed by worker count. | |
| std::size_t | clustering::math::clampedJobCount (std::size_t nJobs) noexcept |
Clamp a caller-supplied nJobs to a valid worker count. | |
| bool | clustering::math::shouldSpawnPool (std::size_t totalOps, std::size_t nJobs, std::size_t minOpsPerWorker=std::size_t{1}<< 15) noexcept |
Decide whether spawning a pool with nJobs workers is worth it for totalOps of arithmetic work. | |