Class rmat_edge_generator

Nested Relationships

Class Documentation

class rmat_edge_generator

RMAT edge generator, based on Boost Graph’s RMAT generator

Options include scrambling vertices based on a hash funciton, and symmetrizing the list. Generated edges are not sorted. May contain duplicate and self edges.

Public Types

typedef uint64_t vertex_descriptor
typedef std::pair<uint64_t, uint64_t> value_type
typedef value_type edge_type

Public Functions

rmat_edge_generator(uint64_t seed, uint64_t vertex_scale, uint64_t edge_count, double a, double b, double c, double d, bool scramble, bool undirected)

seed used to be 5489

input_iterator_type begin()

Returns the begin of the input iterator.

input_iterator_type end()

Returns the end of the input iterator.

void sanity_max_vertex_id()
uint64_t max_vertex_id()
size_t size()

Protected Functions

edge_type generate_edge()

Generates a new RMAT edge. This function was adapted from the Boost Graph Library.

edge_type generate_edge(std::mt19937 &rng, std::uniform_real_distribution<> &dis)

Protected Attributes

const uint64_t m_seed
std::mt19937 m_rng
std::uniform_real_distribution m_dis
const uint64_t m_vertex_scale
const uint64_t m_edge_count
const bool m_scramble
const bool m_undirected
const double m_rmat_a
const double m_rmat_b
const double m_rmat_c
const double m_rmat_d
class input_iterator_type : public std::iterator<std::input_iterator_tag, edge_type, ptrdiff_t, const edge_type *, const edge_type&>

InputIterator class for rmat_edge_generator.

Public Functions

input_iterator_type(rmat_edge_generator *ptr_rmat, uint64_t count)
const edge_type &operator*() const
input_iterator_type &operator++()
input_iterator_type operator++(int)
edge_type *operator->()
bool is_equal(const input_iterator_type &_x) const

Friends

bool operator==(const input_iterator_type &x, const input_iterator_type &y)

Return true if x and y are both end or not end, or x and y are the same.

bool operator!=(const input_iterator_type &x, const input_iterator_type &y)

Return false if x and y are both end or not end, or x and y are the same.