pylibcugraph.uniform_random_walks#

pylibcugraph.uniform_random_walks(
ResourceHandle resource_handle,
_GPUGraph input_graph,
start_vertices,
size_t max_length,
random_state=None,
)[source]#

Compute uniform random walks for each nodes in ‘start_vertices’

Parameters:
resource_handle: ResourceHandle

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

input_graphSGGraph or MGGraph

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

start_vertices: device array type

Device array containing the list of starting vertices from which to run the uniform random walk

max_length: size_t

The maximum depth of the uniform random walks

random_state: int (Optional)

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

Returns:
A tuple containing two device arrays and an size_t which are respectively
the vertices path, the edge path weights and the maximum path length