GoDiagram Web Reference
AdjacentExchangeCrossingReductionBendStraighten Method

the layer to be reordered
indicates which adjacent layers should be taken into consideration when calculating the crossing matrix
indicates whether or not to reorder to nodes to straighten links
indicates which adjacent layers should be taken into consideration when calculating the bends of a link
Adjusts the columns of nodes within the unfixedLayer to simultaneously reduce the number of link crossings and the number of "bends" between the unfixedLayer and its adjacent layers between the unfixedLayer and its adjacent layers. The directionCR argument indicates which of the adjacent layers should be taken into consideration when reducing the number of link 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 directionBS argument indicates which of the adjacent layers should be taken into consideration when reducing the number of bends.
            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 "weighted bend" between a node U and a node V connected by link L is calculated by abs((U.column + L.portFromColOffset) - (V.column + L.portToColOffset)) * LinkStraightenWeight(L) The LinkStraightenWeight attempts to give higher priority to links between "artificial" nodes; i.e., long links in the final layout will be straighter. The idea is to use a bubble-sort technique to exchange adjacent nodes whenever doing so reduces the number of link crossings or the number of bends. This function is used in both crossing reduction and bend straightening. Returns true if some change was made to the layer.
Syntax
'Declaration
 
Protected Overridable Function AdjacentExchangeCrossingReductionBendStraighten( _
   ByVal unfixedLayer As Integer, _
   ByVal directionCR As Integer, _
   ByVal straighten As Boolean, _
   ByVal directionBS As Integer _
) As Boolean
protected virtual bool AdjacentExchangeCrossingReductionBendStraighten( 
   int unfixedLayer,
   int directionCR,
   bool straighten,
   int directionBS
)

Parameters

unfixedLayer
the layer to be reordered
directionCR
indicates which adjacent layers should be taken into consideration when calculating the crossing matrix
straighten
indicates whether or not to reorder to nodes to straighten links
directionBS
indicates which adjacent layers should be taken into consideration when calculating the bends of a link

Return Value

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

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoLayoutLayeredDigraph Class
GoLayoutLayeredDigraph Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback