pylibcugraph.select_random_vertices#

pylibcugraph.select_random_vertices(
ResourceHandle resource_handle,
_GPUGraph graph,
random_state,
size_t num_vertices,
)[source]#

Select random vertices from the graph

Parameters:
resource_handleResourceHandle

Handle to the underlying device resources needed for referencing data and running algorithms.

graphSGGraph or MGGraph

The input graph, for either Single or Multi-GPU operations.

random_stateint , optional

Random state to use when generating samples. Optional argument, defaults to a hash of process id, time, and hostname. (See pylibcugraph.random.CuGraphRandomState)

num_verticessize_t , optional

Number of vertices to sample. Optional argument, defaults to the total number of vertices.

Returns:
return random vertices from the graph