Click or drag to resize

Dijkstra Properties

The Dijkstra type exposes the following members.

Properties
  NameDescription
Public propertyDistances
Distances to all vertices from source vertex.

The value double.MaxValue indicates that the vertex can not be reached from the source vertices, or that the algorithm has been manually stopped before reaching the vertix.

Public propertyPredecessor
Predecessors index for each vertex it specifies the previous vertex in the path from source to target.

The value -1 indicates that the vertex can not be reached from the source vertices, or that the algorithm has been manually stopped before reaching the vertix, or the vertex is a source vertex.

Public propertyPredecessorSource
Predecessor source index, for each vertex it specifies the predecessor source, i.e. which source this vertex has the shortest path from. This is only relevant if more than one source is specified.

Enable by setting the UsePredecessorSource flag. If the flag is not enabled, this array will be null.

The value -1 indicates that the vertex can not be reached from the source vertices, or that the algorithm has been manually stopped before reaching the vertix.

Public propertyStop
User defined stopping criteria. When node i has been visited (distance has been calculated for node), return true to stop.

If not set, distances to all vertices are calculated.

Public propertyUsePredecessorSource
Flag defining whether to calculate and store the PredecessorSource

Must be set before calling Initialize

Public propertyVisited
Array of visited vertices.

When no stopping criteria is set (using the Stop property), the non-visited nodes are not reachable from the source nodes.

If a stopping criteria is set, only nodes with the visited flag set to true has a shortest distance correctly calculated.

Public propertyVisitEdge
User defined criteria of whether to visit edge. If returning false, this edge is disregarded.

If not set, all edges are considered.

Top
See Also