pylibhipgraph.select_random_vertices#
2025-05-20
1 min read time
select_random_vertices (ResourceHandle resource_handle, _GPUGraph graph, random_state, size_t num_vertices)
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 pylibhipgraph.random.HipGraphRandomState)
- 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