Graphs::GraphConceptRep< VertexType, EdgeType > Class Template Reference

Representation class for graph types. More...

#include <GraphConcept.h>

Inheritance diagram for Graphs::GraphConceptRep< VertexType, EdgeType >:

RefCounter List of all members.

Public Types

typedef VertexType vertex_type
typedef EdgeType edge_type

Public Member Functions

GraphConceptRepclone () const

Private Member Functions

 GraphConceptRep ()
const map< int, vertex_type > & getVertices () const
 Get a set of all vertices.
int newVertex ()
 Add a new vertex to a graph disconnected from all others.
int newVertex (const vertex_type &V)
 Add a new vertex to a graph. All edges in "in" and "out" sets will be incorporated to the graph.
void replaceVertex (int v, const vertex_type &V)
 Replace a vertex v with V. If v does not exist then V simply becomes a vertex with the number v.
void eraseVertex (int v)
 Erase a vertex from a graph.
void newEdge (int v, const edge_type &E)
 Add a new edge to a graph.
void eraseVertex (int v, const edge_type &E)
 Erase an edge from a graph.
void clear ()
 Clear a graph.
void pinch (int v1, int v2)
int _newVertex (int v, const vertex_type &V)
 This function assumes that the vertex v does not exist and V has a correct structure to be incorporated to a graph.

Private Attributes

map< int, vertex_typetheVertices
int maxVertex
 The maximal unused number of a vertex (used in newVertex).

Friends

class GraphConcept< vertex_type, edge_type >

Detailed Description

template<class VertexType, class EdgeType>
class Graphs::GraphConceptRep< VertexType, EdgeType >

Representation class for graph types.

Definition at line 47 of file GraphConcept.h.


Member Typedef Documentation

template<class VertexType, class EdgeType>
typedef EdgeType Graphs::GraphConceptRep< VertexType, EdgeType >::edge_type
 

Definition at line 57 of file GraphConcept.h.

template<class VertexType, class EdgeType>
typedef VertexType Graphs::GraphConceptRep< VertexType, EdgeType >::vertex_type
 

Definition at line 56 of file GraphConcept.h.


Constructor & Destructor Documentation

template<class VertexType, class EdgeType>
Graphs::GraphConceptRep< VertexType, EdgeType >::GraphConceptRep  )  [inline, private]
 

Definition at line 68 of file GraphConcept.h.

Referenced by Graphs::GraphConceptRep< VertexType, EdgeType >::clone().


Member Function Documentation

template<class VertexType, class EdgeType>
int Graphs::GraphConceptRep< VertexType, EdgeType >::_newVertex int  v,
const vertex_type V
[inline, private]
 

This function assumes that the vertex v does not exist and V has a correct structure to be incorporated to a graph.

Definition at line 213 of file GraphConcept.h.

Referenced by Graphs::GraphConceptRep< VertexType, EdgeType >::newVertex(), and Graphs::GraphConceptRep< VertexType, EdgeType >::replaceVertex().

template<class VertexType, class EdgeType>
void Graphs::GraphConceptRep< VertexType, EdgeType >::clear  )  [inline, private]
 

Clear a graph.

Definition at line 152 of file GraphConcept.h.

References Graphs::GraphConcept< VertexType, EdgeType >::clear().

template<class VertexType, class EdgeType>
GraphConceptRep* Graphs::GraphConceptRep< VertexType, EdgeType >::clone  )  const [inline]
 

Definition at line 78 of file GraphConcept.h.

References Graphs::GraphConceptRep< VertexType, EdgeType >::GraphConceptRep().

template<class VertexType, class EdgeType>
void Graphs::GraphConceptRep< VertexType, EdgeType >::eraseVertex int  v,
const edge_type E
[inline, private]
 

Erase an edge from a graph.

Definition at line 142 of file GraphConcept.h.

template<class VertexType, class EdgeType>
void Graphs::GraphConceptRep< VertexType, EdgeType >::eraseVertex int  v  )  [inline, private]
 

Erase a vertex from a graph.

Definition at line 107 of file GraphConcept.h.

References Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices.

Referenced by Graphs::GraphConceptRep< VertexType, EdgeType >::replaceVertex().

template<class VertexType, class EdgeType>
const map< int, vertex_type >& Graphs::GraphConceptRep< VertexType, EdgeType >::getVertices  )  const [inline, private]
 

Get a set of all vertices.

Definition at line 88 of file GraphConcept.h.

References Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices.

template<class VertexType, class EdgeType>
void Graphs::GraphConceptRep< VertexType, EdgeType >::newEdge int  v,
const edge_type E
[inline, private]
 

Add a new edge to a graph.

Definition at line 133 of file GraphConcept.h.

template<class VertexType, class EdgeType>
int Graphs::GraphConceptRep< VertexType, EdgeType >::newVertex const vertex_type V  )  [inline, private]
 

Add a new vertex to a graph. All edges in "in" and "out" sets will be incorporated to the graph.

Definition at line 96 of file GraphConcept.h.

References Graphs::GraphConceptRep< VertexType, EdgeType >::_newVertex(), and Graphs::GraphConceptRep< VertexType, EdgeType >::maxVertex.

template<class VertexType, class EdgeType>
int Graphs::GraphConceptRep< VertexType, EdgeType >::newVertex  )  [inline, private]
 

Add a new vertex to a graph disconnected from all others.

Definition at line 91 of file GraphConcept.h.

References Graphs::GraphConceptRep< VertexType, EdgeType >::maxVertex, and Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices.

template<class VertexType, class EdgeType>
void Graphs::GraphConceptRep< VertexType, EdgeType >::pinch int  v1,
int  v2
[inline, private]
 

Definition at line 157 of file GraphConcept.h.

template<class VertexType, class EdgeType>
void Graphs::GraphConceptRep< VertexType, EdgeType >::replaceVertex int  v,
const vertex_type V
[inline, private]
 

Replace a vertex v with V. If v does not exist then V simply becomes a vertex with the number v.

Definition at line 101 of file GraphConcept.h.

References Graphs::GraphConceptRep< VertexType, EdgeType >::_newVertex(), and Graphs::GraphConceptRep< VertexType, EdgeType >::eraseVertex().


Friends And Related Function Documentation

template<class VertexType, class EdgeType>
friend class GraphConcept< vertex_type, edge_type > [friend]
 

Definition at line 59 of file GraphConcept.h.


Member Data Documentation

template<class VertexType, class EdgeType>
int Graphs::GraphConceptRep< VertexType, EdgeType >::maxVertex [private]
 

The maximal unused number of a vertex (used in newVertex).

Definition at line 256 of file GraphConcept.h.

Referenced by Graphs::GraphConceptRep< VertexType, EdgeType >::newVertex().

template<class VertexType, class EdgeType>
map< int, vertex_type > Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices [private]
 

Definition at line 253 of file GraphConcept.h.

Referenced by Graphs::GraphConceptRep< VertexType, EdgeType >::eraseVertex(), Graphs::GraphConceptRep< VertexType, EdgeType >::getVertices(), and Graphs::GraphConceptRep< VertexType, EdgeType >::newVertex().


The documentation for this class was generated from the following file:
Generated on Sun Dec 3 10:59:07 2006 for CRyptography And Groups (CRAG) by  doxygen 1.4.6