Class EliasFanoGraph

Class Documentation

class EliasFanoGraph

a static directed graph with its adjacency lists in Elias-Fano

Public Functions

EliasFanoGraph(void) = default
explicit EliasFanoGraph(const std::vector<std::vector<std::size_t>> &a)

the graph of the adjacency lists a, node u having the successors a[ u ]

Pre:

each a[ u ] is strictly increasing in [ 0 , n ), n^2 < 2^64

std::size_t order(void) const

the number of nodes, n

std::size_t edges(void) const

the number of edges, m

std::size_t outdegree(std::size_t u) const
Pre:

u < order()

std::size_t successor(std::size_t u, std::size_t i) const

the i-th successor of u, from 0

Pre:

u < order() and i < outdegree( u )

std::vector<std::size_t> successors(std::size_t u) const

the successors of u, in increasing order

Pre:

u < order()

bool hasEdge(std::size_t u, std::size_t v) const

whether ( u , v ) is an edge

Pre:

u , v < order()

std::size_t sizeInBits(void) const

the bits of the two sequences, with their directories