Class HamiltonianPathWithTopologicalSort
- Namespace
- AlgorithmsSW.Digraph
- Assembly
- AlgorithmsSW.dll
public class HamiltonianPathWithTopologicalSort : IHamiltonianPath
- Inheritance
-
HamiltonianPathWithTopologicalSort
- Implements
- Inherited Members
- Extension Methods
Constructors
HamiltonianPathWithTopologicalSort(IDigraph)
public HamiltonianPathWithTopologicalSort(IDigraph digraph)
Parameters
digraph
IDigraph
Properties
HasHamiltonianPath
Gets a value indicating whether the digraph has a Hamiltonian path.
public bool HasHamiltonianPath { get; }
Property Value
Path
Gets the vertices on a Hamiltonian path in the digraph, if there is one.
public IEnumerable<int> Path { get; }
Property Value
Exceptions
- InvalidOperationException
there is no Hamiltonian cycle.