GoDigram for .NET Framework and .NET Core
Northwoods.Go.Layout Namespace / GoLayoutLayeredDigraph Class / CrossingMatrix Method
In This Topic
    CrossingMatrix Method
    In This Topic
    Computes the crossing matrix between the unfixedLayer and its adjacent layers. The direction argument indicates which adjacent layers should be taken into consideration when computing the crossing matrix: direction == 0 -- use unfixedLayer - 1 and unfixedLayer + 1 direction > 0 -- use unfixedLayer - 1 (sweeping away from layer 0) direction < 0 -- use unfixedLayer + 1 (sweeping towards layer 0) The resulting integer array can be used as follows: if index1 and index2 are the indices corresponding to two nodes on the unfixedLayer and crossmat is the crossing matrix, then crossmat[index1 * indices[unfixedLayer] + index2] is the number of crossing that occur if the node corresponding to index1 is placed to the left of the node corresponding to index2. If index1 == index2, then crossmat[index1 * indices[unfixedLayer] + index2] is the number of crossings between links to and from the node corresponding to index1.
    Syntax
    protected virtual int[] CrossingMatrix( 
       int unfixedLayer,
       int direction
    )

    Parameters

    unfixedLayer
    direction

    Return Value

    Returns the crossing matrix
    See Also