Skip to content

Commit 9c97b07

Browse files
authored
Add Cluster and Distance sections to C documentation (#1955)
They are currently not documented. Authors: - Micka (https://github.com/lowener) - Corey J. Nolet (https://github.com/cjnolet) - Anupam (https://github.com/aamijar) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: #1955
1 parent e9223ce commit 9c97b07

5 files changed

Lines changed: 76 additions & 1 deletion

File tree

c/include/cuvs/distance/pairwise_distance.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
#pragma once
@@ -12,6 +12,11 @@
1212
extern "C" {
1313
#endif
1414

15+
/**
16+
* @defgroup pairwise_distance_c C pairwise distance
17+
* @{
18+
*/
19+
1520
/**
1621
* @brief Compute pairwise distances for two matrices
1722
*
@@ -46,6 +51,9 @@ cuvsError_t cuvsPairwiseDistance(cuvsResources_t res,
4651
DLManagedTensor* dist,
4752
cuvsDistanceType metric,
4853
float metric_arg);
54+
55+
/** @} */
56+
4957
#ifdef __cplusplus
5058
}
5159
#endif

docs/source/c_api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ C API Documentation
88
:maxdepth: 4
99

1010
c_api/core_c_api.rst
11+
c_api/distance.rst
12+
c_api/cluster.rst
1113
c_api/neighbors.rst
1214
c_api/preprocessing.rst

docs/source/c_api/cluster.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Clustering
2+
==========
3+
4+
.. role:: py(code)
5+
:language: c
6+
:class: highlight
7+
8+
.. toctree::
9+
:maxdepth: 2
10+
:caption: Contents:
11+
12+
cluster_kmeans_c.rst
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
K-Means
2+
=======
3+
4+
.. role:: py(code)
5+
:language: c
6+
:class: highlight
7+
8+
Parameters
9+
----------
10+
11+
``#include <cuvs/cluster/kmeans.h>``
12+
13+
.. doxygengroup:: kmeans_c_params
14+
:project: cuvs
15+
:members:
16+
:content-only:
17+
18+
19+
Functions
20+
---------
21+
22+
``#include <cuvs/cluster/kmeans.h>``
23+
24+
.. doxygengroup:: kmeans_c
25+
:project: cuvs
26+
:members:
27+
:content-only:

docs/source/c_api/distance.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Distance
2+
========
3+
4+
.. role:: py(code)
5+
:language: c
6+
:class: highlight
7+
8+
9+
Distance types
10+
--------------
11+
12+
``#include <cuvs/distance/distance.h>``
13+
14+
.. doxygenenum:: cuvsDistanceType
15+
:project: cuvs
16+
17+
18+
Pairwise distance
19+
-----------------
20+
21+
``#include <cuvs/distance/pairwise_distance.h>``
22+
23+
.. doxygengroup:: pairwise_distance_c
24+
:project: cuvs
25+
:members:
26+
:content-only:

0 commit comments

Comments
 (0)