Tells you in linear time if two nodes are adjacent. More...
#include <ogdf/internal/energybased/AdjacencyOracle.h>
Public Member Functions | |
| AdjacencyOracle (const Graph &G) | |
| The one and only constrcutor for the class. | |
| ~AdjacencyOracle () | |
| This is the destructor. | |
| bool | adjacent (const node, const node) const |
| This returns true if the two nodes are adjacent in G, false otherwise. | |
Private Attributes | |
| NodeArray< int > | m_nodeNum |
| The internal number given to each node. | |
| Array2D< bool > * | m_adjacencyMatrix |
| A 2D-array where the entry is true if the nodes with the corresponding number are adjacent. | |
Tells you in linear time if two nodes are adjacent.
AdjacencyOracle is intialized with a Graph and returns for any pair of nodes in constant time if they are adajcent.
Definition at line 72 of file AdjacencyOracle.h.
| ogdf::AdjacencyOracle::AdjacencyOracle | ( | const Graph & | G | ) |
The one and only constrcutor for the class.
| ogdf::AdjacencyOracle::~AdjacencyOracle | ( | ) | [inline] |
This is the destructor.
Definition at line 77 of file AdjacencyOracle.h.
| bool ogdf::AdjacencyOracle::adjacent | ( | const | node, | |
| const | node | |||
| ) | const |
This returns true if the two nodes are adjacent in G, false otherwise.
Array2D<bool>* ogdf::AdjacencyOracle::m_adjacencyMatrix [private] |
A 2D-array where the entry is true if the nodes with the corresponding number are adjacent.
Definition at line 82 of file AdjacencyOracle.h.
NodeArray<int> ogdf::AdjacencyOracle::m_nodeNum [private] |
The internal number given to each node.
Definition at line 81 of file AdjacencyOracle.h.