Class SourceFirstBidirectionalTopologicalSortAlgorithm<TVertex, TEdge>
Topological sort algorithm (can be performed on an acyclic bidirectional graph).
Inheritance
System.Object
AlgorithmBase<IBidirectionalGraph<TVertex, TEdge>>
SourceFirstBidirectionalTopologicalSortAlgorithm<TVertex, TEdge>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: QuikGraph.Algorithms.TopologicalSort
Assembly: QuikGraph.dll
Syntax
public sealed class SourceFirstBidirectionalTopologicalSortAlgorithm<TVertex, TEdge> : AlgorithmBase<IBidirectionalGraph<TVertex, TEdge>>, IAlgorithm<IBidirectionalGraph<TVertex, TEdge>>, IComputation, IAlgorithmComponent where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Constructors
| Improve this Doc View SourceSourceFirstBidirectionalTopologicalSortAlgorithm(IBidirectionalGraph<TVertex, TEdge>, TopologicalSortDirection, Int32)
Initializes a new instance of the SourceFirstBidirectionalTopologicalSortAlgorithm<TVertex, TEdge> class.
Declaration
public SourceFirstBidirectionalTopologicalSortAlgorithm(IBidirectionalGraph<TVertex, TEdge> visitedGraph, TopologicalSortDirection direction, int capacity = -1)
Parameters
Type | Name | Description |
---|---|---|
IBidirectionalGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
TopologicalSortDirection | direction | Sort direction. |
System.Int32 | capacity | Sorted vertices capacity. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
SourceFirstBidirectionalTopologicalSortAlgorithm(IBidirectionalGraph<TVertex, TEdge>, Int32)
Initializes a new instance of the SourceFirstBidirectionalTopologicalSortAlgorithm<TVertex, TEdge> class.
Declaration
public SourceFirstBidirectionalTopologicalSortAlgorithm(IBidirectionalGraph<TVertex, TEdge> visitedGraph, int capacity = -1)
Parameters
Type | Name | Description |
---|---|---|
IBidirectionalGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
System.Int32 | capacity | Sorted vertices capacity. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceInDegrees
Vertices in-degrees.
Declaration
public IDictionary<TVertex, int> InDegrees { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<TVertex, System.Int32> |
SortedVertices
Sorted vertices.
Declaration
public TVertex[] SortedVertices { get; }
Property Value
Type | Description |
---|---|
TVertex[] |
Methods
| Improve this Doc View SourceInitialize()
Called on algorithm initialization step.
Declaration
protected override void Initialize()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IBidirectionalGraph<TVertex, TEdge>>.Initialize()
|
Improve this Doc
View Source
InternalCompute()
Algorithm compute step.
Declaration
protected override void InternalCompute()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IBidirectionalGraph<TVertex, TEdge>>.InternalCompute()
Events
| Improve this Doc View SourceVertexAdded
Fired when a vertex is added to the set of sorted vertices.
Declaration
public event VertexAction<TVertex> VertexAdded
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |