Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
AdjacencyOracle.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/basic.h>
36
37#include <vector>
38
39namespace ogdf {
40
42
49public:
56 explicit AdjacencyOracle(const Graph& G, int degreeThreshold = 32);
57
60
62 bool adjacent(node v, node w) const;
63
64private:
66 int index(node v, node w) const;
67
69 std::vector<bool> m_adjacencies;
70};
71
72}
Includes declaration of graph class.
Basic declarations, included by all source files.
Tells you in constant time if two nodes are adjacent.
int index(node v, node w) const
Returns an index for m_adjacencies that corresponds to the entry of nodes v and w.
NodeArray< int > m_nodeNum
The internal number given to each node.
~AdjacencyOracle()
The destructor.
std::vector< bool > m_adjacencies
An entry is true iff the corresponding nodes are adjacent.
AdjacencyOracle(const Graph &G, int degreeThreshold=32)
The constructor for the class, needs time O(n^2 + m) ∩ Ω(n).
bool adjacent(node v, node w) const
Returns true iff vertices v and w are adjacent.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Class for the representation of nodes.
Definition Graph_d.h:241
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.