Craig's Utility Library  4.0 Beta
Utilities.DataTypes.Graph< T > Class Template Reference

Class used to represent a graph More...

Inheritance diagram for Utilities.DataTypes.Graph< T >:

Public Member Functions

 Graph ()
 Initializes a new instance of the Graph<T> class. More...
 
Edge< T > AddEdge (Vertex< T > source, Vertex< T > sink)
 Adds the edge. More...
 
Vertex< T > AddVertex (T data)
 Adds the vertex. More...
 
Graph< T > Copy ()
 Copies this instance. More...
 
IEnumerator< Vertex< T > > GetEnumerator ()
 Returns an enumerator that iterates through the collection. More...
 
Graph< T > RemoveVertex (Vertex< T > vertex)
 Removes the vertex. More...
 

Properties

List< Vertex< T > > Vertices [get]
 Gets the vertices. More...
 

Detailed Description

Class used to represent a graph

Template Parameters
TThe data type stored in the graph

Definition at line 54 of file Graph.cs.

Constructor & Destructor Documentation

Initializes a new instance of the Graph<T> class.

Definition at line 59 of file Graph.cs.

Member Function Documentation

Edge<T> Utilities.DataTypes.Graph< T >.AddEdge ( Vertex< T >  source,
Vertex< T >  sink 
)

Adds the edge.

Parameters
sourceThe source.
sinkThe sink.
Returns
The new edge

Definition at line 76 of file Graph.cs.

Vertex<T> Utilities.DataTypes.Graph< T >.AddVertex ( data)

Adds the vertex.

Parameters
dataThe data.
Returns
The new vertex

Definition at line 86 of file Graph.cs.

Graph<T> Utilities.DataTypes.Graph< T >.Copy ( )

Copies this instance.

Returns
A copy of this graph

Definition at line 97 of file Graph.cs.

IEnumerator<Vertex<T> > Utilities.DataTypes.Graph< T >.GetEnumerator ( )

Returns an enumerator that iterates through the collection.

Returns
An enumerator that can be used to iterate through the collection.

Definition at line 120 of file Graph.cs.

Graph<T> Utilities.DataTypes.Graph< T >.RemoveVertex ( Vertex< T >  vertex)

Removes the vertex.

Parameters
vertexThe vertex.
Returns
This

Definition at line 142 of file Graph.cs.

Property Documentation

List<Vertex<T> > Utilities.DataTypes.Graph< T >.Vertices
get

Gets the vertices.

The vertices.

Definition at line 68 of file Graph.cs.


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