GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoDocument Class / MakesDirectedCycleFast Method
the node to start from
the node that the proposed link would connect to
In This Topic
    MakesDirectedCycleFast Method
    In This Topic
    This method returns true if adding a link from a to b would result in a cycle of directed links going through the node a.
    Syntax
    public static bool MakesDirectedCycleFast( 
       IGoNode a,
       IGoNode b
    )

    Parameters

    a
    the node to start from
    b
    the node that the proposed link would connect to
    Remarks
    This method ignores any reflexive links--i.e. links whose ports are both part of the same node. This assumes that there are no directed cycles already present in the graph. If there are any such cycles, this recursive method may cause stack overflows or infinite recursion. However, this method is faster than MakesDirectedCycle. Set ValidCycle to GoDocumentValidCycle.NotDirectedFast when you can be sure there are never any cycles in the graph; otherwise set it to GoDocumentValidCycle.NotDirected, which is slower but can handle existing cycles in the graph.
    See Also