Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::AdjacencyOracle Class Reference

Tells you in linear time if two nodes are adjacent. More...

#include <AdjacencyOracle.h>

List of all members.

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.


Detailed Description

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 70 of file AdjacencyOracle.h.


Constructor & Destructor Documentation

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 75 of file AdjacencyOracle.h.


Member Function Documentation

bool ogdf::AdjacencyOracle::adjacent ( const   node,
const   node 
) const

This returns true if the two nodes are adjacent in G, false otherwise.


Member Data Documentation

NodeArray<int> ogdf::AdjacencyOracle::m_nodeNum [private]

The internal number given to each node.

Definition at line 79 of file AdjacencyOracle.h.

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 80 of file AdjacencyOracle.h.


The documentation for this class was generated from the following file:

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:11 2007 by doxygen 1.5.4.