linkage.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <raft/core/handle.hpp>
20 #include <raft/sparse/hierarchy/common.h>
21 
22 #include <cuvs/distance/distance.hpp>
23 
24 namespace raft {
25 class handle_t;
26 }
27 
28 namespace ML {
29 
45 void single_linkage_pairwise(const raft::handle_t& handle,
46  const float* X,
47  size_t m,
48  size_t n,
49  raft::hierarchy::linkage_output<int>* out,
50  cuvs::distance::DistanceType metric,
51  int n_clusters = 5);
52 
73  const raft::handle_t& handle,
74  const float* X,
75  size_t m,
76  size_t n,
77  raft::hierarchy::linkage_output<int>* out,
78  cuvs::distance::DistanceType metric = cuvs::distance::DistanceType::L2Unexpanded,
79  int c = 15,
80  int n_clusters = 5);
81 
82 void single_linkage_pairwise(const raft::handle_t& handle,
83  const float* X,
84  size_t m,
85  size_t n,
86  raft::hierarchy::linkage_output<int64_t>* out,
87  cuvs::distance::DistanceType metric,
88  int n_clusters = 5);
89 
90 }; // namespace ML
Definition: dbscan.hpp:30
void single_linkage_neighbors(const raft::handle_t &handle, const float *X, size_t m, size_t n, raft::hierarchy::linkage_output< int > *out, cuvs::distance::DistanceType metric=cuvs::distance::DistanceType::L2Unexpanded, int c=15, int n_clusters=5)
Computes single-linkage hierarchical clustering on a dense input feature matrix and outputs the label...
void single_linkage_pairwise(const raft::handle_t &handle, const float *X, size_t m, size_t n, raft::hierarchy::linkage_output< int > *out, cuvs::distance::DistanceType metric, int n_clusters=5)
Computes single-linkage hierarchical clustering on a dense input feature matrix and outputs the label...
Definition: dbscan.hpp:26