Class GraphCycleException
- Namespace
- Graph1x.Algorithms
- Assembly
- Graph1x.dll
Thrown when an operation that requires an acyclic graph (such as topological sorting) encounters a cycle.
public class GraphCycleException : InvalidOperationException, ISerializable
- Inheritance
-
GraphCycleException
- Implements
- Inherited Members
Constructors
GraphCycleException()
Initializes the exception with a default message.
public GraphCycleException()
GraphCycleException(string)
Initializes the exception with message.
public GraphCycleException(string message)
Parameters
messagestringThe error message.
GraphCycleException(string, IReadOnlyList<object>)
Initializes the exception with message and the offending cycle.
public GraphCycleException(string message, IReadOnlyList<object> cycle)
Parameters
messagestringThe error message.
cycleIReadOnlyList<object>The vertices of the offending cycle, in cycle order.
GraphCycleException(string, Exception)
Initializes the exception with message and innerException.
public GraphCycleException(string message, Exception innerException)
Parameters
Properties
Cycle
Gets the vertices of the offending cycle in cycle order (the last vertex connects back to the first), or an empty list when the cycle was not captured.
public IReadOnlyList<object> Cycle { get; }