GoDiagram Win Reference
GoLayoutLayeredDigraph Class Methods


For a list of all members of this type, see GoLayoutLayeredDigraph members.

Public Methods
 NameDescription
Public MethodCreateNetworkAllocate a GoLayoutLayeredDigraphNetwork.  
Public MethodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public MethodDisposeOverloaded.  (Inherited from System.ComponentModel.Component)
Public MethodGetIndicesReturns the indices array.  
Public MethodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public MethodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public MethodLayoutNodesAndLinksUpdates the physical location of "real" nodes and links to reflect the layout.  
Public MethodPerformLayoutOverridden. Performs a layered-digraph auto-layout.  
Public MethodRaiseProgressOverloaded. Call OnProgress with an appropriate GoLayoutProgressEventArgs. (Inherited from Northwoods.Go.Layout.GoLayout)
Public MethodToString (Inherited from System.ComponentModel.Component)
Top
Protected Methods
 NameDescription
Protected MethodAdjacentExchangeCrossingReductionBendStraightenAdjusts 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.  
Protected MethodAssignLayersAssigns every node in the input network to a layer. The layering satisfies the following: if L is a link from node U to node V, then U.layer > V.layer; further, U.layer - V.layer >= LinkMinLength(L). This method can be overridden to customize how nodes are assigned layers.  
Protected MethodAvoidOrthogonalOverlapsTry to avoid overlapping segments of Orthogonal links.  
Protected MethodBarycentersComputes the array of barycenters (average) columns for the nodes in the unfixedLayer based on the columns of predecessors (direction < 0), successors (direction > 0), or both predecessors and successors (direction == 0) Elements without a defined barycenter will have an entry of -1.  
Protected MethodBendsComputes the bends between the unfixedLayer and its adjacent layers. The "bend" between a node U and a node V connected by a link L is calcluated by abs((U.column + L.portFromColOffset) - (V.column + L.portToColOffset)) 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 direction argument indicates which adjacent layers should be taken into consideration when computing the crossing matrix: direction == 0 -- use unfixedLayer - 1 and unfixedLayer + 1direction > 0 -- use unfixedLayer - 1 (sweeping away from layer 0)direction < 0 -- use unfixedLayer + 1 (sweepeing towards layer 0)  
Protected MethodBendStraightenAdjusts the columns of nodes within the unfixedLayer to reduce the number of "bends" 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 bends. 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 iterate the ShiftBendStraighten and adjacentExchangeBendStraighten methods until no improvements are made.  
Protected MethodComponentPackAdjusts the columns of nodes in the network to produce a layout which is tightly packed. The idea is that the network can be fragmented from a given column in the following way: all nodes "behind" the column are placed into a single component, and the remainder of the network is divided into connected components. Each of these new components can be examined, and those that can be merged with the given column do so.  
Protected MethodComponentPackAuxAttempts to augment the argument column by merging components into from the argument direction. direction > 0 -- columns > the argument column are shifted direction < 0 -- columns < the argument column are shifted Returns true if the argument column was changed.  
Protected MethodComponentUnsetUses a depth first search algorithm to set the component of all nodes in a component. **Unset functions only set the component and recurse on nodes whose component is currently set to the unset value. The forward and backward bools indicate the direction to use for a directed depth first search from node.  
Protected MethodCountBendsReturns the total number of bends in the network. The "bend" between a node U and a node V connected by a link L is calcluated by abs((U.column + L.portFromColOffset) - (V.column + L.portToColOffset)) 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.  
Protected MethodCountCrossingsReturns the total number of crossings in the network. Internal method used by ReduceCrossings.  
Protected MethodCrossingMatrixComputes 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.  
Protected MethodDepthFirstInInitializeIndicesAssigns every node in the input network an index number, such that nodes in the same layer will be labeled with consecutive indices in left to right order. Uses a depth first "inward" (i.e., following links from "to-node" to "from-node") traversal of the network, assigning indices to nodes as they are discovered.  
Protected MethodDepthFirstInInitializeIndicesVisitAssigns node the appropriate index and updates the indices array. Implements the recursive portion of a depth first search.  
Protected MethodDepthFirstOutInitializeIndicesAssigns every node in the input network an index number, such that nodes in the same layer will be labeled with consecutive indices in left to right order. Uses a depth first "outward" (i.e., following links from "from-node" to "to-node") traversal of the network, assigning indices to nodes as they are discovered.  
Protected MethodDepthFirstOutInitializeIndicesVisitAssigns node the appropriate index and updates the indices array. Implements the recursive portion of a depth first search.  
Protected MethodDepthFirstSearchCycleRemovalRemoves cycles from the input network using a depth first search. A link not in the depth first forest is reversed if the from-node was discovered and finished by the depth first search after the to-node was discovered but before the to-node was finished.  
Protected MethodDepthFirstSearchCycleRemovalVisitPeforms the recursive step of the depth first search on node. Updates the discover and finish time of node. Updates the forest flag of followed links.  
Protected MethodFinalize (Inherited from System.ComponentModel.Component)
Protected MethodGetService (Inherited from System.ComponentModel.Component)
Protected MethodGreedyCycleRemovalRemoves cycles from the input network using a Greedy-Cycle-Removal algorithm. The idea is to induce an order on all nodes in the network (U1, U2, U3, ..., Uk) such that for the majority of links L = (Ui, Uj) it is true that i < j. All links L = (Ui, Uj) such that i > j are reversed.  
Protected MethodGreedyCycleRemovalFindNodeFinds a valid node in the network. Returns null if no valid node exists. Used by GreedyCycleRemoval.  
Protected MethodGreedyCycleRemovalFindNodeMaxDegDiffFinds a valid node in the network that maximizes outdeg - indeg. The degree difference is computed using valid successors and predecessors. Returns null if no valid node exists. Used by GreedyCycleRemoval.  
Protected MethodGreedyCycleRemovalFindSinkFinds a sink node in the network. A node is considered a sink node if it is valid and all of its predecessors are invalid. A valid node with no predecessors is vacously a sink. Returns null if no valid sink node exists. Used by GreedyCycleRemoval.  
Protected MethodGreedyCycleRemovalFindSourceFinds a source node in the network. A node is considered a sink node if it is valid and all of its successors are invalid. A valid node with no successors is vacously a source. Returns null if no valid source node exists. Used by GreedyCycleRemoval.  
Protected MethodInitializeColumnsAssigns every node in the input network a column number, such that nodes in the same layer will be labeled with increasing indices in left to right order.  
Protected MethodInitializeIndicesAssigns every node in the input network an index number, such that nodes in the same layer will be labeled with consecutive indices in left to right order. All consecutive layout operations will preserve or update the indices. In addition, the indices array is initialized such that indices[layer] indicates the number of nodes in the layer. Finally, the variables minIndexLayer and maxIndexLayer record the layers that correspond to the minimum and maximum nodes in a layer.  
Protected MethodLayoutLinksRoutes the links. Called by LayoutNodesAndLinks  
Protected MethodLayoutNodesLays out the nodes. Called by LayoutNodesAndLinks  
Protected MethodLinkLengthWeightThe function LinkLengthWeight returns the weight of the link represented by the GoLayoutLayeredDigraphLink link. This weight is used by OptimalLinkLengthLayering to minimize weighted link lengths. The default implementation gives all links a length weight of 1. This function can be overridden to provide "fine-tuning" of the layout.  
Protected MethodLinkMinLengthThe function LinkMinLength returns the minimum length of the link represented by the GoLayoutLayeredDigraphLink link. The default implementation gives multi-links a minimum length of 2, and all other links a minimum length of 1. This function can be overridden to provide "fine-tuning" of the layout.  
Protected MethodLinkStraightenWeightThe function LinkStraightenWeight returns the weight of the link represented by the GoLayoutLayeredDigraphLink link. This weight is used by the straightening methods to give priority straightening to those links with higher weights. The default implementation gives links between two "real" nodes a weight of 1, links between a "real" node and an "artifical" node a weight of 4, and links between two "artificial" nodes a weight of 8. This function can be overridden to provide "fine-tuning" of the layout.  
Protected MethodLongestPathSinkLayeringAssigns every node in the input network to a layer. In addition to the requirements described in AssignLayers(), LongestPathSinkLayering ensures that every sink appears in layer 0 and every node is as close to a sink as possible.  
Protected MethodLongestPathSinkLayeringLengthComputes the length of the longest path from node to a sink node and sets the layer of node to that length. Returns the length of the longest path from node to a sink node.  
Protected MethodLongestPathSourceLayeringAssigns every node in the input network to a layer. In addition to the requirements described in AssignLayers, LongestPathSourceLayering ensures that every source appears in layer maxLayer and every node is as close to a source as possible.  
Protected MethodLongestPathSourceLayeringLengthComputes the length of the longest path from node to a source node and sets the layer of node to that length. Returns the length of the longest path from node to a source node.  
Protected MethodMakeProperConverts the input network into a proper digraph; i.e., artificial nodes and links are introduced into the network such that every link is between nodes in adjacent layers. This has the effect of breaking up long links into a sequence of artificial nodes.  
Protected MethodMedianBarycenterCrossingReductionReorders 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 + 1direction > 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.  
Protected MethodMediansComputes the array of median columns for the nodes in the unfixedLayer based on the columns of predecessors (direction < 0), successors (direction > 0), or both predecessors and successors (direction == 0). Elements without a defined median will have an entry of -1.  
Protected MethodMedianStraightenAdjusts the columns of nodes within the unfixedLayer in order to move nodes towards their median columns. The direction argument indicates which of the adjacent layers should be taken into consideration when computing the median column. The idea is shift nodes to the left and to the right to move nodes towards their median columns, ensuring that no two nodes have overlapping "allocations" of columns. Returns true if some change was made to the layer.  
Protected MethodMemberwiseCloneOverloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected MethodNaiveInitializeIndicesAssigns every node in the input network an index number, such that nodes in the same layer will be labeled with consecutive indices in left to right order. Uses a naive implementation that assigns indices to nodes as they are encountered in a sweep of the network. Because of the way networks are stored, this has the effect of initialy placing all "artificial" nodes to the right of all "real" nodes.  
Protected MethodNodeMinColumnSpaceThe function NodeMinColumnSpace returns the minimum space reserved to either side of this node. The default implementation returns 0 for nodes that do not correspond to top-level Go objects. For nodes that do correspond to top-level Go objects, the column space is determined by the width and height of the object divided by the ColumnSpacing. Note: all sub-classes that override this method should ensure that nodes that do not correspond to top-level Go objects have a minimum column space of 0. This function can be overridden to provide "fine-tuning" of the layout.  
Protected MethodNodeMinLayerSpaceThis function returns the minimum space reserved for this node from the center point for the "depth" of the layer that it is in.  
Protected MethodNormalizeAdjusts the columns of all nodes such that the leftmost column will be column 0 and maxColumn is updated appropriately.  
Protected MethodOnProgressInvoke all Progress event handlers. (Inherited from Northwoods.Go.Layout.GoLayout)
Protected MethodOptimalLinkLengthLayeringAssigns every node in the input network to a layer. In addition to the requirements described in AssignLayers(), OptimalLinkLengthLayering ensures that nodes are set in layers to minimize the total weighted link length. Hence, OptimalLinkLengthLayering minimizes the sum (U.layer - V.layer) * LinkLengthWeight(L) over all links L = (U,V).  
Protected MethodOptimalLinkLengthLayeringDepthFirstSearchPeforms the depth first search of the network. After traversing all decendents, the node is "pull"-ed into the appropriate layer.  
Protected MethodOptimalLinkLengthLayeringPullAttempts to move node and it's tight component to a higher layer.  
Protected MethodOptimalLinkLengthLayeringPushAttempts to move node and it's tight component to a lower layer.  
Protected MethodPackAdjusts the columns of nodes in the network to produce a layout which is tightly packed. The idea is that columns which are "un-allocated" through all layers can be eliminated and the nodes can be shifted into that space.  
Protected MethodPackAuxAttempts to remove the argument column by shifting columns into from the argument direction. direction > 0 -- columns > argument column are shifted direction < 0 -- columns < argument column are shifted Returns true if the argument column was removed.  
Protected MethodReduceCrossingsReorders nodes within layers to reduce the total number of link crossings in the network. There are many, many possible implementations of this function. Basically, some iteration of MedianBarycenterCrossingReduction and AdjacentExchangeCrossingReductionBendStraighten sweeping back and forth over the layers is needed. The default implementation has performed favorably on a large number of networks, but other options are available.  
Protected MethodRemoveCyclesRemoves cycles from the input network by reversing some number of links.  
Protected MethodRemoveNetworkOverridden. Set Network to null.  
Protected MethodRestoreLayoutThe function RestoreLayout restores the layer, column, and index of all nodes from an array of integers.  
Protected MethodSaveLayoutThe function SaveLayout stores the layer, column, and index of all nodes in an array of integers.  
Protected MethodSetComponentsUses a depth first search algorithm to set the component of all nodes in a component. The forward and backward bools indicate the direction to use for a directed depth first search from node.  
Protected MethodShiftBendStraightenAdjusts the columns of nodes within the unfixedLayer to reduce the number of "bends" 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 bends. 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 shift nodes to the left and to the right to reduce the bends ensuring that no two nodes have overlapping "allocations" of columns. Return true if some change was made to the layer.  
Protected MethodStraightenAndPackAdjusts the columns of nodes in the network to produce a layout which reduces the number of bends and is tightly packed.  
Protected MethodTightComponentUses a depth first search algorithm to set the component of all nodes in a component. The forward and backward bools indicate the direction to use for a directed depth first search from node. **Unset functions only set the component and recurse on nodes whose component is currently set to the unset value. Tight** functions only set the component and recurse on nodes which are "tight", in the sense that the nodes are separated by a link which corresponds to the minumum link length of the link between the two nodes.  
Protected MethodTightComponentUnsetUses a depth first search algorithm to set the component of all nodes in a component. Tight** functions only set the component and recurse on nodes which are "tight", in the sense that the nodes are separated by a link which corresponds to the minumum link length of the link between the two nodes. **Unset functions only set the component and recurse on nodes whose component is currently set to the unset value. The forward and backward bools indicate the direction to use for a directed depth first search from node.  
Protected MethodTightPackAdjusts the columns of nodes in the network to produce a layout which is tightly packed. The idea is that two adjacent columns can be "merged" if each layer has at most one of the two columns "allocated" to a node.  
Protected MethodTightPackAuxAttempts to augment the argument column by merging columns into from the argument direction. direction > 0 -- columns > the argument column are shifted direction < 0 -- columns < the argument column are shifted Returns true if the argument column was changed.  
Top
See Also

Reference

GoLayoutLayeredDigraph Class
Northwoods.Go.Layout Namespace

 

 


© 2015. Northwoods Software Corporation. All Rights Reserved.

Send Feedback