DHI.Mike1D.Generic.Graph Namespace

Various graph algorithms

Classes

DepthFirstSearch Class for performing a depth first search on a graph.

It returns a number of properties of the graph

Dijkstra Class for calculating distances from a vertex/node to any other vertex/node in the graph, using the Dijstra algorithm.

Before calling Start, you must initialize the algorithm by calling either Initialize(Int32), or Initialize followed by at least one call to SetSource(Int32, Double).

The algorithm uses a binary heap as priority queue, hence the running time of the Dijkstra algorithm is O((E+V)*log(V))

Edge Edge in graph, from StartVertex to EndVertex
Graph Base implementation of the IGraph interface, using the Vertex class for all its vertices
GraphException An exception specific to the graph algorithms
GraphExtensions Extension methods related to a graph
RCM

Calculates a Reverse Cuthill-McKee ordering for a graph. This minimizes the bandwidth of a (sparse) symmetric matrix representation of the graph.

TopologicalSort Class performing a topological sort of a directed acyclic graph.

A topological sort is a linear ordering of the vertices such that if the graph contains and edge from u to v (v "depends on" u), then u appears before v in the ordering.

If the graph is cyclic, the sort procedure fails with an GraphException.

Vertex Vertex/node in a graph

Interfaces

IEdge An edge connects two vertices. It can have a weight associated.

An edge is also sometimes called a link.

The two vertices is specified by their index into the list of vertices in the graph.

IGraph Interface for a generic graph.

The graph interfaces provide what the graph algorithms as a minimum requires in order to do their processing.

IVertex A vertex is a junction in the graph, often also called a node.