Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
BradReesWork committed Aug 31, 2023
1 parent e3cb99b commit 9f1341b
Show file tree
Hide file tree
Showing 10 changed files with 128 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cpp/include/cugraph_c/community_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/** @defgroup community Community algorithms
* @{
@}
* @}
*/

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph_c/core_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/** @defgroup core Core algorithms
* @{
@}
* @}
*/

#ifdef __cplusplus
Expand Down
7 changes: 4 additions & 3 deletions cpp/include/cugraph_c/labeling_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ extern "C" {
/** @defgroup labeling Labeling algorithms
* @ingroup c_api
* @{
* @}
*/

/**
Expand All @@ -37,6 +38,7 @@ typedef struct {
} cugraph_labeling_result_t;

/**
* @ingroup labeling
* @brief Get the vertex ids from the labeling result
*
* @param [in] result The result from a labeling algorithm
Expand All @@ -46,6 +48,7 @@ cugraph_type_erased_device_array_view_t* cugraph_labeling_result_get_vertices(
cugraph_labeling_result_t* result);

/**
* @ingroup labeling
* @brief Get the label values from the labeling result
*
* @param [in] result The result from a labeling algorithm
Expand All @@ -55,6 +58,7 @@ cugraph_type_erased_device_array_view_t* cugraph_labeling_result_get_labels(
cugraph_labeling_result_t* result);

/**
* @ingroup labeling
* @brief Free labeling result
*
* @param [in] result The result from a labeling algorithm
Expand Down Expand Up @@ -105,6 +109,3 @@ cugraph_error_code_t cugraph_strongly_connected_components(const cugraph_resourc
}
#endif

/**
* @}
*/
39 changes: 36 additions & 3 deletions cpp/include/cugraph_c/sampling_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
/** @defgroup sampling Sampling algorithms
* @ingroup c_api
* @{
* @}
*/

/**
* @defgroup sampling_test
* @ingroup c_api
* @{
* @}
*/

#ifdef __cplusplus
Expand Down Expand Up @@ -135,6 +143,7 @@ cugraph_error_code_t cugraph_node2vec(const cugraph_resource_handle_t* handle,
cugraph_error_t** error);

/**
* @ingroup sampling
* @brief Get the max path length from random walk result
*
* @param [in] result The result from random walks
Expand All @@ -146,6 +155,7 @@ size_t cugraph_random_walk_result_get_max_path_length(cugraph_random_walk_result
// difference at the moment is that RW results contain weights
// and extract_paths results don't. But that's probably wrong.
/**
* @ingroup sampling
* @brief Get the matrix (row major order) of vertices in the paths
*
* @param [in] result The result from a random walk algorithm
Expand All @@ -155,6 +165,7 @@ cugraph_type_erased_device_array_view_t* cugraph_random_walk_result_get_paths(
cugraph_random_walk_result_t* result);

/**
* @ingroup sampling
* @brief Get the matrix (row major order) of edge weights in the paths
*
* @param [in] result The result from a random walk algorithm
Expand All @@ -164,6 +175,7 @@ cugraph_type_erased_device_array_view_t* cugraph_random_walk_result_get_weights(
cugraph_random_walk_result_t* result);

/**
* @ingroup sampling
* @brief If the random walk result is compressed, get the path sizes
* @deprecated This call will no longer be relevant once the new node2vec are called
*
Expand All @@ -174,6 +186,7 @@ cugraph_type_erased_device_array_view_t* cugraph_random_walk_result_get_path_siz
cugraph_random_walk_result_t* result);

/**
* @ingroup sampling
* @brief Free random walks result
*
* @param [in] result The result from random walks
Expand All @@ -195,6 +208,7 @@ typedef struct {
} cugraph_sampling_options_t;

/**
* @ingroup sampling
* @brief Enumeration for prior sources behavior
*/
typedef enum cugraph_prior_sources_behavior_t {
Expand All @@ -206,6 +220,7 @@ typedef enum cugraph_prior_sources_behavior_t {
} cugraph_prior_sources_behavior_t;

/**
* @ingroup sampling
* @brief Create sampling options object
*
* All sampling options set to FALSE
Expand All @@ -218,6 +233,7 @@ cugraph_error_code_t cugraph_sampling_options_create(cugraph_sampling_options_t*
cugraph_error_t** error);

/**
* @ingroup sampling
* @brief Set flag to renumber results
*
* @param options - opaque pointer to the sampling options
Expand All @@ -226,6 +242,7 @@ cugraph_error_code_t cugraph_sampling_options_create(cugraph_sampling_options_t*
void cugraph_sampling_set_renumber_results(cugraph_sampling_options_t* options, bool_t value);

/**
* @ingroup sampling
* @brief Set flag to sample with_replacement
*
* @param options - opaque pointer to the sampling options
Expand All @@ -234,6 +251,7 @@ void cugraph_sampling_set_renumber_results(cugraph_sampling_options_t* options,
void cugraph_sampling_set_with_replacement(cugraph_sampling_options_t* options, bool_t value);

/**
* @ingroup sampling
* @brief Set flag to sample return_hops
*
* @param options - opaque pointer to the sampling options
Expand All @@ -242,6 +260,7 @@ void cugraph_sampling_set_with_replacement(cugraph_sampling_options_t* options,
void cugraph_sampling_set_return_hops(cugraph_sampling_options_t* options, bool_t value);

/**
* @ingroup sampling
* @brief Set prior sources behavior
*
* @param options - opaque pointer to the sampling options
Expand All @@ -251,6 +270,7 @@ void cugraph_sampling_set_prior_sources_behavior(cugraph_sampling_options_t* opt
cugraph_prior_sources_behavior_t value);

/**
* @ingroup sampling
* @brief Set flag to sample dedupe_sources prior to sampling
*
* @param options - opaque pointer to the sampling options
Expand All @@ -259,6 +279,7 @@ void cugraph_sampling_set_prior_sources_behavior(cugraph_sampling_options_t* opt
void cugraph_sampling_set_dedupe_sources(cugraph_sampling_options_t* options, bool_t value);

/**
* @ingroup sampling
* @brief Free sampling options object
*
* @param [in] options Opaque pointer to sampling object
Expand Down Expand Up @@ -374,6 +395,7 @@ cugraph_error_code_t cugraph_uniform_neighbor_sample(
cugraph_error_t** error);

/**
* @ingroup sampling
* @brief Get the source vertices from the sampling algorithm result
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -383,6 +405,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_sources(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the destination vertices from the sampling algorithm result
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -392,6 +415,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_destinations(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the start labels from the sampling algorithm result
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -401,6 +425,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_start_labels(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the edge_id from the sampling algorithm result
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -410,6 +435,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_edge_id(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the edge_type from the sampling algorithm result
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -419,6 +445,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_edge_type(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the edge_weight from the sampling algorithm result
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -428,6 +455,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_edge_weight(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the hop from the sampling algorithm result
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -437,6 +465,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_hop(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the index from the sampling algorithm result
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -446,6 +475,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_index(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the result offsets from the sampling algorithm result
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -455,6 +485,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_offsets(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the renumber map
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -464,6 +495,7 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_renumber_map(
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Get the renumber map offsets
*
* @param [in] result The result from a sampling algorithm
Expand All @@ -473,13 +505,15 @@ cugraph_type_erased_device_array_view_t* cugraph_sample_result_get_renumber_map_
const cugraph_sample_result_t* result);

/**
* @ingroup sampling
* @brief Free a sampling result
*
* @param [in] result The result from a sampling algorithm
*/
void cugraph_sample_result_free(cugraph_sample_result_t* result);

/**
* @ingroup sampling_test
* @brief Create a sampling result (testing API)
*
* @param [in] handle Handle for accessing resources
Expand Down Expand Up @@ -510,6 +544,7 @@ cugraph_error_code_t cugraph_test_sample_result_create(
cugraph_error_t** error);

/**
* @ingroup sampling_test
* @brief Create a sampling result (testing API)
*
* @param [in] handle Handle for accessing resources
Expand Down Expand Up @@ -540,6 +575,7 @@ cugraph_error_code_t cugraph_test_uniform_neighborhood_sample_result_create(
cugraph_error_t** error);

/**
* @ingroup sampling_test
* @brief Select random vertices from the graph
*
* @param [in] handle Handle for accessing resources
Expand All @@ -563,6 +599,3 @@ cugraph_error_code_t cugraph_select_random_vertices(const cugraph_resource_handl
}
#endif

/**
* @}
*/
2 changes: 1 addition & 1 deletion docs/cugraph/source/api_docs/cugraph_c/core.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Core
==========
====


Core Number
Expand Down
14 changes: 5 additions & 9 deletions docs/cugraph/source/api_docs/cugraph_c/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ cuGraph C API documentation
:caption: API Documentation

centrality.rst
community.rst
core.rst
labeling.rst
sampling.rst
similarity.rst


.. #include <cugraph_c/centrality_algorithms.h>
#include <cugraph_c/community_algorithms.h>
#include <cugraph_c/core_algorithms.h>
#include <cugraph_c/labeling_algorithms.h>
#include <cugraph_c/sampling_algorithms.h>
#include <cugraph_c/similarity_algorithms.h>
#include <cugraph_c/traversal_algorithms.h>
traversal.rst
20 changes: 20 additions & 0 deletions docs/cugraph/source/api_docs/cugraph_c/labeling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Components
==========


Weakly Connected Components
---------------------------
.. doxygenfunction:: cugraph_weakly_connected_components
:project: libcugraph

Strongly Connected Components
--------
.. doxygenfunction:: cugraph_strongly_connected_components
:project: libcugraph

Support
-------
.. doxygengroup:: labeling
:project: libcugraph
:members:
:content-only:
41 changes: 41 additions & 0 deletions docs/cugraph/source/api_docs/cugraph_c/sampling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Sampling
========

Uniform Random Walks
--------------------
.. doxygenfunction:: cugraph_uniform_random_walks
:project: libcugraph

Biased Random Walks
--------------------
.. doxygenfunction:: cugraph_biased_random_walks
:project: libcugraph

Random Walks via Node2Vec
-------------------------
.. doxygenfunction:: cugraph_node2vec_random_walks
:project: libcugraph

Node2Vec
--------
.. doxygenfunction:: cugraph_node2vec
:project: libcugraph

Uniform Neighborhood Sampling
-----------------------------
.. doxygenfunction:: cugraph_uniform_neighbor_sample_with_edge_properties
:project: libcugraph

.. doxygenfunction:: cugraph_uniform_neighbor_sample
:project: libcugraph

Sampling Testing
----------------
.. doxygenfunction:: sampling_test
:project: libcugraph

Support
-------
.. doxygenfunction:: sampling
:project: libcugraph

Loading

0 comments on commit 9f1341b

Please sign in to comment.