52 #ifndef HAVOQGT_UPPER_TRIANGLE_EDGE_GENERATOR_INCLUDED
53 #define HAVOQGT_UPPER_TRIANGLE_EDGE_GENERATOR_INCLUDED
55 #include <boost/random.hpp>
73 edge_type, ptrdiff_t, const edge_type*, const edge_type&> {
103 bool undirected, uint64_t i, uint64_t j)
156 return std::make_pair(
m_j + 1,
m_i + 1);
168 uint64_t x = 0, y = 0;
170 while (y < num_edges) {
176 for (uint64_t i = 0; i < x; i++) {
177 for (uint64_t j = i; j < x; j++) {
181 assert(count * 2 >= num_edges);
196 uint64_t start_count = (total_edges /
size) * rank;
210 auto itr_end =
end();
211 while (itr1 != itr_end) {
212 assert(itr1 == itr2);
213 assert(*itr1 == *itr2);
255 #endif // HAVOQGT_UPPER_TRIANGLE_EDGE_GENERATOR_INCLUDED
std::pair< uint64_t, uint64_t > edge_type
input_iterator_type begin()
Returns the begin of the input iterator.
input_iterator_type end()
Returns the end of the input iterator.
upper_triangle_edge_generator(uint64_t total_edges, int rank, int size, bool undirected)
const uint64_t m_total_edges
uint64_t find_max_vertex(uint64_t num_edges)
const uint64_t m_max_vertex