Click or drag to resize
AdjacencyListWeightedDirectedGraphT Class
An implementation of the abstract datatype weighted directed graph using an adjacency list to encode the set of edges.
Inheritance Hierarchy
SystemObject
  Slash.Collections.GraphsAdjacencyListWeightedDirectedGraphT

Namespace: Slash.Collections.Graphs
Assembly: Slash.Collections (in Slash.Collections.dll) Version: 1.0.6018.40177
Syntax
public class AdjacencyListWeightedDirectedGraph<T> : IWeightedGraph<T>
where T : IGraphVertex

Type Parameters

T
Type of the vertices of this graph.

The AdjacencyListWeightedDirectedGraphT type exposes the following members.

Constructors
  NameDescription
Public methodAdjacencyListWeightedDirectedGraphT
Default constructor for this implementation of directed graphs. Takes an array of vertices as parameter, which should be the set of vertices of this graph. Initially there are no edges.
Top
Properties
  NameDescription
Public propertyEdgeCount
Number of edges between the vertices of this graph.
Public propertyEdges
Edges between the vertices of this graph.
Public propertyEdgeWeights
Weights of the edges between the vertices of this graph.
Public propertyVertexCount
Number of vertices of this graph.
Public propertyVertices
Vertices of this graph.
Top
Methods
  NameDescription
Public methodAddEdges
Adds two edges between two vertices in this graph in O(1), weighted with the given value.
Public methodAddSingleEdge
Adds one edge between two vertices in this graph in O(1), weighted with the given value.
Public methodDegree
Returns the degree of the given vertex, in other words the number of adjacent vertices, in O(1).
Public methodGetEdgeWeight
Gets the weight of the edge between the specified vertices in O(n), where n is the number of adjacent vertices of the first one.
Public methodHasEdge
Checks if there is an edge between two vertices of this graph in O(n), where n is the number of adjacent vertices of the first one.
Public methodListOfAdjacentVertices
Returns a list containing the adjacent vertices of a given vertex in this graph in O(1).
Top
See Also