omc::OMCGraph Class Reference

List of all members.

Public Types

enum  state { unvisited, discovered, finished }

Public Member Functions

 OMCGraph (size_t)
size_t getNumVertices () const
size_t getNumEdges () const
void addEdge (index_t, index_t)
size_t diameter () const
size_t numTriangles () const
size_t num4gons () const
size_t num5gons () const

Friends

std::ostream & operator<< (std::ostream &, const OMCGraph &)

Constructor & Destructor Documentation

omc::OMCGraph::OMCGraph ( size_t  n  )  [inline]

Constructor from the number of vertices.


Member Function Documentation

void omc::OMCGraph::addEdge ( index_t  i,
index_t  j 
) [inline]

Add an edge.

size_t omc::OMCGraph::diameter (  )  const

Compute the diamter.

size_t omc::OMCGraph::getNumEdges (  )  const [inline]

Get the number of edges in the graph.

size_t omc::OMCGraph::getNumVertices (  )  const [inline]

Get the number of vertices in the graph.

size_t omc::OMCGraph::num4gons (  )  const

Count 4-gons. Brute force implementation - O(V^4).

size_t omc::OMCGraph::num5gons (  )  const

Count N-gons. Brute force implementation: enumerate all permutations of vertices and check the connectivity of adjacent vertices in the permutation.

size_t omc::OMCGraph::numTriangles (  )  const

Count triangles. Brute force implementation - O(V^3).


The documentation for this class was generated from the following files:
 All Classes Functions

Generated on Fri Feb 12 16:10:23 2010 by  doxygen 1.6.1