GoDigram for .NET Framework and .NET Core
Northwoods.Go.Layout Namespace / GoLayoutLayeredDigraph Class / MedianBarycenterCrossingReduction Method
In This Topic
    MedianBarycenterCrossingReduction Method
    In This Topic
    Reorders nodes within the unfixedLayer to reduce the number of link crossings between the unfixedLayer and its adjacent layers. The direction argument indicates which of the adjacent layers should be taken into consideration when reducing the number of crossings. direction == 0 -- use unfixedLayer - 1 and unfixedLayer + 1 direction > 0 -- use unfixedLayer - 1 (sweeping away from layer 0) direction < 0 -- use unfixedLayer + 1 (sweepeing towards layer 0) The idea is to calculate the median and barycenter for each node in the unfixedLayer, and to sort the nodes in the unfixedLayer by their median and barycenter values. Returns true if some change was made to the layer.
    Syntax
    protected virtual bool MedianBarycenterCrossingReduction( 
       int unfixedLayer,
       int direction
    )

    Parameters

    unfixedLayer
    direction

    Return Value

    Returns true if some change was made to the layer and false otherwise.
    See Also