76 return m_n == 1 ? 0 : m_level[m_representative[v]];
106 const int &sparseTable(
int i,
int j)
const 109 return m_table[i * m_rangeJ + j - 1];
113 return m_table[i * m_rangeJ + j - 1];
121 int rmq(
int u,
int v)
const;
Implements the <O(n log n), O(1)>-time "sparse table" algorithm by Bender and Farach-Colton to comput...
Data type for general directed graphs (adjacency list representation).
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
const int m_n
number of nodes in graph
int level(node v) const
Returns the level of a node. The level of the root is 0.
const node m_root
the root of the tree
Array< int > m_table
preprocessed M[i,j] array
const int m_rangeJ
always floor(log(m_len)) (size of a row in the table)
NodeArray< int > m_representative
Euler[Representative[v]] = v.
Array< int > m_level
L[i] is distance of node E[i] from root.
Class for the representation of nodes.
const int m_len
length of the RMQ array (always 2 m_n - 1)
Includes declaration of graph class.
The namespace for all OGDF objects.
Array< node > m_euler
Euler[i] is i-th node visited in Euler Tour.
int & sparseTable(int i, int j)