Skip to content

Commit 2738db7

Browse files
author
tarang-jain
committed
docs
1 parent 041ff95 commit 2738db7

File tree

4 files changed

+54
-5
lines changed

4 files changed

+54
-5
lines changed

cpp/include/cuvs/cluster/agglomerative.hpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,28 @@ void single_linkage(
120120
cuvs::cluster::agglomerative::Linkage linkage = cuvs::cluster::agglomerative::Linkage::KNN_GRAPH,
121121
std::optional<int> c = std::make_optional<int>(DEFAULT_CONST_C));
122122

123+
/**
124+
* Given a mutual reachability graph and core distances, constructs a linkage over it by computing
125+
* the minimum spanning tree and dendrogram. Returns mst edges sorted by weight and the linkage.
126+
* Cluster labels are hierarchical and not flattened.
127+
* @tparam value_idx
128+
* @tparam value_t
129+
* @param[in] handle raft handle for resource reuse
130+
* @param[in] X data points (size m * n)
131+
* @param[in] m number of rows
132+
* @param[in] n number of columns
133+
* @param[in] metric distance metric to use
134+
* @param[in] core_dists core distances (size m)
135+
* @param[in] indptr CSR indices of mutual reachability knn graph (size m + 1)
136+
* @param[out] mutual_reachability_coo (symmetrized) maximum reachability distance for the k nearest
137+
* neighbors
138+
* @param[out] out_mst_src src vertex of MST edges (size m - 1)
139+
* @param[out] out_mst_dst dst vertex of MST eges (size m - 1)
140+
* @param[out] out_mst_weights weights of MST edges (size m - 1)
141+
* @param[out] out_dst children of output
142+
* @param[out] out_delta distances of output
143+
* @param[out] out_size cluster sizes of output
144+
*/
123145
template <typename value_idx, typename value_t, typename nnz_t>
124146
void build_mutual_reachability_linkage(
125147
raft::resources const& handle,

cpp/src/cluster/detail/single_linkage.cuh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,23 @@ struct FixConnectivitiesMRRedOp {
217217
};
218218

219219
/**
220-
* Given a mutual reachability graph and sparse matrix, constructs a linkage over it by computing
221-
* mst and dendrogram. Returns mst edges sorted by weight
220+
* Given a mutual reachability graph and core distances, constructs a linkage over it by computing
221+
* the minimum spanning tree and dendrogram. Returns mst edges sorted by weight and the linkage.
222+
* Cluster labels are hierarchical and not flattened.
222223
* @tparam value_idx
223224
* @tparam value_t
224225
* @param[in] handle raft handle for resource reuse
225226
* @param[in] X data points (size m * n)
226227
* @param[in] m number of rows
227228
* @param[in] n number of columns
228229
* @param[in] metric distance metric to use
229-
* @param[in] params hyper parameters
230230
* @param[in] core_dists core distances (size m)
231-
* @param[out] out output container object
231+
* @param[in] indptr CSR indices of mutual reachability knn graph (size m + 1)
232+
* @param[out] mutual_reachability_coo (symmetrized) maximum reachability distance for the k nearest
233+
* neighbors
234+
* @param[out] out_mst_src src vertex of MST edges (size m - 1)
235+
* @param[out] out_mst_dst dst vertex of MST eges (size m - 1)
236+
* @param[out] out_mst_weights weights of MST edges (size m - 1)
232237
* @param[out] out_dst children of output
233238
* @param[out] out_delta distances of output
234239
* @param[out] out_size cluster sizes of output

cpp/src/cluster/single_linkage.cuh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,28 @@ void single_linkage(raft::resources const& handle,
102102
n_clusters);
103103
}
104104

105+
/**
106+
* Given a mutual reachability graph and core distances, constructs a linkage over it by computing
107+
* the minimum spanning tree and dendrogram. Returns mst edges sorted by weight and the linkage.
108+
* Cluster labels are hierarchical and not flattened.
109+
* @tparam value_idx
110+
* @tparam value_t
111+
* @param[in] handle raft handle for resource reuse
112+
* @param[in] X data points (size m * n)
113+
* @param[in] m number of rows
114+
* @param[in] n number of columns
115+
* @param[in] metric distance metric to use
116+
* @param[in] core_dists core distances (size m)
117+
* @param[in] indptr CSR indices of mutual reachability knn graph (size m + 1)
118+
* @param[out] mutual_reachability_coo (symmetrized) maximum reachability distance for the k nearest
119+
* neighbors
120+
* @param[out] out_mst_src src vertex of MST edges (size m - 1)
121+
* @param[out] out_mst_dst dst vertex of MST eges (size m - 1)
122+
* @param[out] out_mst_weights weights of MST edges (size m - 1)
123+
* @param[out] out_dst children of output
124+
* @param[out] out_delta distances of output
125+
* @param[out] out_size cluster sizes of output
126+
*/
105127
template <typename value_t, typename value_idx>
106128
void build_mutual_reachability_linkage(
107129
raft::resources const& handle,

cpp/src/cluster/single_linkage_float.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#include "single_linkage.cuh"
18-
// #include <cuvs/cluster/agglomerative.hpp>
18+
#include <cuvs/cluster/agglomerative.hpp>
1919

2020
#include <raft/core/device_mdspan.hpp>
2121
#include <raft/core/resources.hpp>

0 commit comments

Comments
 (0)