aegisgraph
A high-performance, secure C++ graph library using adjacency lists
Loading...
Searching...
No Matches
RandomWalker Class Reference

Class for performing hardware-efficient random walks on graphs. More...

#include <RandomWalker.hpp>

Public Member Functions

 RandomWalker ()
 Constructor that seeds both PCG and Xoshiro generators using high entropy sources.
 
std::vector< std::vector< int > > random_walk (const Graph &graph, int start_node, int walk_length, int num_walks)
 Generate random walks from a starting node.
 

Detailed Description

Class for performing hardware-efficient random walks on graphs.

Member Function Documentation

◆ random_walk()

std::vector< std::vector< int > > RandomWalker::random_walk ( const Graph graph,
int  start_node,
int  walk_length,
int  num_walks 
)

Generate random walks from a starting node.

This function performs multiple random walks of fixed length from a given start node, using hardware-aware pseudorandom number generators to ensure reproducibility and efficiency.

Parameters
graphThe graph to walk on.
start_nodeThe node to start walks from.
walk_lengthNumber of steps per walk.
num_walksNumber of walks to generate.
Returns
A vector of walks (each walk is a vector of node IDs).

The documentation for this class was generated from the following files: