aegisgraph
A high-performance, secure C++ graph library using adjacency lists
Loading...
Searching...
No Matches
RandomWalker.hpp
1
17 #ifndef RANDOM_WALKER_H
18 #define RANDOM_WALKER_H
19
20 #include <vector>
21 #include <unordered_map>
22 #include <string>
23 #include <random>
24 #include "Graph.hpp"
25
31 public:
36
49 std::vector<std::vector<int>> random_walk(const Graph& graph, int start_node, int walk_length, int num_walks);
50
51 private:
52 std::mt19937_64 pcg_engine;
53 uint64_t xoshiro_state[4];
54
58 void seed_xoshiro();
59
64 uint64_t xoshiro_next();
65 };
66
67 #endif // RANDOM_WALKER_H
68
High-performance, secure graph library using parallel adjacency lists.
Definition Graph.hpp:40
Class for performing hardware-efficient random walks on graphs.
Definition RandomWalker.hpp:30
RandomWalker()
Constructor that seeds both PCG and Xoshiro generators using high entropy sources.
Definition RandomWalker.cpp:6
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.
Definition RandomWalker.cpp:39