Packagecom.yworks.yfiles.layout.hierarchic.incremental
Classpublic class PCListOptimizer
InheritancePCListOptimizer Inheritance AbstractPortConstraintOptimizer Inheritance YObject Inheritance Object

This class is an implementation of the com.yworks.yfiles.layout.hierarchic.incremental.PortConstraintOptimizer interface which can be registered with the com.yworks.yfiles.layout.hierarchic.incremental.HierarchicLayouterImpl instance using it's com.yworks.yfiles.layout.hierarchic.incremental.HierarchicLayouterImpl.portConstraintOptimizer method. It will query the graph's DataProvider repository for the com.yworks.yfiles.layout.PortCandidate.SOURCE_PCLIST_DPKEY and com.yworks.yfiles.layout.PortCandidate.TARGET_PCLIST_DPKEY keys and expects them to hold com.yworks.bridge.util.Collection instances of com.yworks.yfiles.layout.PortCandidate s for each edge. Additionally it will query the DataProvider associated with com.yworks.yfiles.layout.PortCandidateSet.NODE_DP_KEY and expects com.yworks.yfiles.layout.PortCandidateSet instances associated with each node in the input graph.

This implementation will then try to assign each edge one of the PortCandidates without creating too many crossings or violating the cost constraints for each PortCandidate.

See also

com.yworks.yfiles.layout.hierarchic.incremental.PortConstraintOptimizer
com.yworks.yfiles.layout.hierarchic.incremental.HierarchicLayouterImpl
com.yworks.yfiles.layout.hierarchic.incremental.HierarchicLayouterImpl.portConstraintOptimizer
com.yworks.yfiles.layout.PortCandidate.SOURCE_PCLIST_DPKEY
com.yworks.yfiles.layout.PortCandidate.TARGET_PCLIST_DPKEY
com.yworks.bridge.util.Collection
com.yworks.yfiles.layout.PortCandidate
com.yworks.yfiles.layout.PortCandidateSet.NODE_DP_KEY
com.yworks.yfiles.layout.PortCandidateSet


Public Properties
 PropertyDefined By
  backloopPenalty : Number
Specifies the penalty cost that is associated with each backloop.
PCListOptimizer
  crossingPenalty : Number
Specifies the penalty cost that is associated with each generated crossing that would be generated if a given combination of PortCandidates would be chosen.
PCListOptimizer
  deterministic : Boolean
Determines whether this implementation should use a deterministic algorithm to assign the PortCandidates.
PCListOptimizer
 InheritedlayoutOrientation : int
Getter: Returns the currently set layout orientation for this class.
AbstractPortConstraintOptimizer
 InheritedmirrorMask : int
Specifies the mirror mask that defines which orientations should be mirrored.
AbstractPortConstraintOptimizer
  overUsagePenalty : Number
Specifies the penalty cost that is associated with each edge being assigned to a port which has no capacity left.
PCListOptimizer
Public Methods
 MethodDefined By
  
PCListOptimizer(init:Boolean = true)
PCListOptimizer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
PCListOptimizer
 Inherited
hashCode():int
YObject
  
[static]
PCListOptimizer
  
[override]
PCListOptimizer
  
[override]
PCListOptimizer
Protected Methods
 MethodDefined By
  
Returns the data provider that provides the port candidate sets for nodes.
PCListOptimizer
 Inherited
AbstractPortConstraintOptimizer
  
PCListOptimizer
 Inherited
Inserts a same layer edge structure for each same layer edge of the original graph.
AbstractPortConstraintOptimizer
 Inherited
optimizeAfterSequencing2(inEdgeOrder:Comparator, outEdgeOrder:Comparator, graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider, itemFactory:ItemFactory):void
Called after the sequence of the nodes has been determined to assign new temporary port constraints to all nodes.
AbstractPortConstraintOptimizer
  
optimizeAfterSequencing3(node:Node, inEdgeOrder:Comparator, outEdgeOrder:Comparator, graph:LayoutGraph, ldp:LayoutDataProvider, itemFactory:ItemFactory):void
[override]
PCListOptimizer
 Inherited
Removes the same layer edge structure created in insertSameLayerStructures().
AbstractPortConstraintOptimizer
Property Detail
backloopPenaltyproperty
backloopPenalty:Number

Specifies the penalty cost that is associated with each backloop. The default value is 1.0d.


Implementation
    public function get backloopPenalty():Number
    public function set backloopPenalty(value:Number):void
crossingPenaltyproperty 
crossingPenalty:Number

Specifies the penalty cost that is associated with each generated crossing that would be generated if a given combination of PortCandidates would be chosen. The default value is 10.0d.


Implementation
    public function get crossingPenalty():Number
    public function set crossingPenalty(value:Number):void
deterministicproperty 
deterministic:Boolean

Determines whether this implementation should use a deterministic algorithm to assign the PortCandidates.


Implementation
    public function get deterministic():Boolean
    public function set deterministic(value:Boolean):void
overUsagePenaltyproperty 
overUsagePenalty:Number

Specifies the penalty cost that is associated with each edge being assigned to a port which has no capacity left. The default value is 100.0d.


Implementation
    public function get overUsagePenalty():Number
    public function set overUsagePenalty(value:Number):void

See also

Constructor Detail
PCListOptimizer()Constructor
public function PCListOptimizer(init:Boolean = true)



Parameters
init:Boolean (default = true)
Method Detail
getClass()method
override public function getClass():Class

Returns
Class
getPortCandidateSetDataProvider()method 
protected function getPortCandidateSetDataProvider(graph:LayoutGraph):DataProvider

Returns the data provider that provides the port candidate sets for nodes.

Parameters

graph:LayoutGraph — The graph that stores the data provider

Returns
DataProvider
initPCListOptimizer()method 
protected final function initPCListOptimizer():void

newPCListOptimizer()method 
public static function newPCListOptimizer():PCListOptimizer

Returns
PCListOptimizer
optimizeAfterLayering()method 
override public function optimizeAfterLayering(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider, itemFactory:ItemFactory):void

Parameters

graph:LayoutGraph
 
layers:Layers
 
ldp:LayoutDataProvider
 
itemFactory:ItemFactory

optimizeAfterSequencing()method 
override public function optimizeAfterSequencing(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider, itemFactory:ItemFactory):void

Parameters

graph:LayoutGraph
 
layers:Layers
 
ldp:LayoutDataProvider
 
itemFactory:ItemFactory

optimizeAfterSequencing3()method 
override protected function optimizeAfterSequencing3(node:Node, inEdgeOrder:Comparator, outEdgeOrder:Comparator, graph:LayoutGraph, ldp:LayoutDataProvider, itemFactory:ItemFactory):void

Parameters

node:Node
 
inEdgeOrder:Comparator
 
outEdgeOrder:Comparator
 
graph:LayoutGraph
 
ldp:LayoutDataProvider
 
itemFactory:ItemFactory