Representation class for graph types. More...
#include <GraphConcept.h>
Public Types | |
typedef VertexType | vertex_type |
typedef EdgeType | edge_type |
Public Member Functions | |
GraphConceptRep * | clone () 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_type > | theVertices |
int | maxVertex |
The maximal unused number of a vertex (used in newVertex). | |
Friends | |
class | GraphConcept< vertex_type, edge_type > |
Representation class for graph types.
Definition at line 47 of file GraphConcept.h.
typedef EdgeType Graphs::GraphConceptRep< VertexType, EdgeType >::edge_type |
Definition at line 57 of file GraphConcept.h.
typedef VertexType Graphs::GraphConceptRep< VertexType, EdgeType >::vertex_type |
Definition at line 56 of file GraphConcept.h.
Graphs::GraphConceptRep< VertexType, EdgeType >::GraphConceptRep | ( | ) | [inline, private] |
Definition at line 68 of file GraphConcept.h.
Referenced by Graphs::GraphConceptRep< VertexType, EdgeType >::clone().
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.
References Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices.
Referenced by Graphs::GraphConceptRep< VertexType, EdgeType >::newVertex(), and Graphs::GraphConceptRep< VertexType, EdgeType >::replaceVertex().
void Graphs::GraphConceptRep< VertexType, EdgeType >::clear | ( | ) | [inline, private] |
Clear a graph.
Definition at line 152 of file GraphConcept.h.
References Graphs::GraphConceptRep< VertexType, EdgeType >::maxVertex, and Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices.
GraphConceptRep* Graphs::GraphConceptRep< VertexType, EdgeType >::clone | ( | ) | const [inline] |
Definition at line 78 of file GraphConcept.h.
References Graphs::GraphConceptRep< VertexType, EdgeType >::GraphConceptRep().
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.
References Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices.
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().
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.
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.
References Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices.
Referenced by Graphs::GraphConceptRep< VertexType, EdgeType >::pinch().
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.
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.
void Graphs::GraphConceptRep< VertexType, EdgeType >::pinch | ( | int | v1, | |
int | v2 | |||
) | [inline, private] |
Definition at line 157 of file GraphConcept.h.
References Graphs::GraphConceptRep< VertexType, EdgeType >::newEdge(), and Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices.
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().
friend class GraphConcept< vertex_type, edge_type > [friend] |
Definition at line 59 of file GraphConcept.h.
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 >::clear(), and Graphs::GraphConceptRep< VertexType, EdgeType >::newVertex().
map< int, vertex_type > Graphs::GraphConceptRep< VertexType, EdgeType >::theVertices [private] |
Definition at line 253 of file GraphConcept.h.
Referenced by Graphs::GraphConceptRep< VertexType, EdgeType >::_newVertex(), Graphs::GraphConceptRep< VertexType, EdgeType >::clear(), Graphs::GraphConceptRep< VertexType, EdgeType >::eraseVertex(), Graphs::GraphConceptRep< VertexType, EdgeType >::getVertices(), Graphs::GraphConceptRep< VertexType, EdgeType >::newEdge(), Graphs::GraphConceptRep< VertexType, EdgeType >::newVertex(), and Graphs::GraphConceptRep< VertexType, EdgeType >::pinch().