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/distance/distance_types.hpp>
21 #include <raft/sparse/hierarchy/common.h>
22 
23 namespace raft {
24 class handle_t;
25 }
26 
27 namespace ML {
28 
44 void single_linkage_pairwise(const raft::handle_t& handle,
45  const float* X,
46  size_t m,
47  size_t n,
48  raft::hierarchy::linkage_output<int>* out,
49  raft::distance::DistanceType metric,
50  int n_clusters = 5);
51 
72  const raft::handle_t& handle,
73  const float* X,
74  size_t m,
75  size_t n,
76  raft::hierarchy::linkage_output<int>* out,
77  raft::distance::DistanceType metric = raft::distance::DistanceType::L2Unexpanded,
78  int c = 15,
79  int n_clusters = 5);
80 
81 void single_linkage_pairwise(const raft::handle_t& handle,
82  const float* X,
83  size_t m,
84  size_t n,
85  raft::hierarchy::linkage_output<int64_t>* out,
86  raft::distance::DistanceType metric,
87  int n_clusters = 5);
88 
89 }; // namespace ML
Definition: dbscan.hpp:30
void single_linkage_pairwise(const raft::handle_t &handle, const float *X, size_t m, size_t n, raft::hierarchy::linkage_output< int > *out, raft::distance::DistanceType metric, int n_clusters=5)
Computes single-linkage hierarchical clustering on a dense input feature matrix and outputs the label...
void single_linkage_neighbors(const raft::handle_t &handle, const float *X, size_t m, size_t n, raft::hierarchy::linkage_output< int > *out, raft::distance::DistanceType metric=raft::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...
Definition: dbscan.hpp:26