Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
Loading...
Searching...
No Matches
range_query.h
Go to the documentation of this file.
1#pragma once
2
3#include <concepts>
4#include <cstddef>
5#include <cstdint>
6#include <utility>
7#include <vector>
8
10#include "clustering/ndarray.h"
11
12namespace clustering::index {
13
31 std::vector<std::vector<std::int32_t>> rows;
32 std::vector<std::uint8_t> isCore;
37 std::vector<std::pair<std::int32_t, std::int32_t>> extraEdges;
38};
39
52template <class Q, class T>
53concept RangeIndex = std::constructible_from<Q, const NDArray<T, 2> &> &&
54 requires(const Q &q, T radius, std::size_t minPts, math::Pool pool) {
55 { q.query(radius, minPts, pool) } -> std::same_as<CoreAdjacency>;
56 };
57
58} // namespace clustering::index
Contract for spatial indexes that can surface the radius-neighborhood adjacency over a borrowed point...
Definition range_query.h:53
Radius-neighborhood adjacency with per-point core flags.
Definition range_query.h:30
std::vector< std::vector< std::int32_t > > rows
Per-point neighbour lists.
Definition range_query.h:31
std::vector< std::uint8_t > isCore
Per-point core flag from the full degree.
Definition range_query.h:32
std::vector< std::pair< std::int32_t, std::int32_t > > extraEdges
Core-core edges carried outside rows.
Definition range_query.h:37
Thin compile-time-templated wrapper around the underlying OwnedPool.
Definition thread.h:109