Loading [MathJax]/extensions/tex2jax.js

Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
AdjacencyOracle.h
Go to the documentation of this file.
1
32#pragma once
33
35
36namespace ogdf {
37
39
46public:
53 explicit AdjacencyOracle(const Graph& G, int degreeThreshold = 32);
54
57
59 bool adjacent(node v, node w) const;
60
61private:
63 int index(node v, node w) const;
64
66 std::vector<bool> m_adjacencies;
67};
68
69}
Declaration and implementation of NodeArray class.
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:521
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.