Package | com.yworks.yfiles.layout.hierarchic |
Class | public class WeightedLayerer |
Inheritance | WeightedLayerer YObject Object |
Implements | OldLayerer, Layerer |
Property | Defined By | ||
---|---|---|---|
maximalDuration : uint
Getter:
Returns the time limit (in milliseconds) set for the algorithm. | WeightedLayerer | ||
weightedCycleRemoval : Boolean
Getter:
Returns true if the edges that need to be reversed are determined using an edge weight based heuristic and false if a Depth First Search based approach should be used. | WeightedLayerer |
Property | Defined By | ||
---|---|---|---|
key : Object
The key to access the weights. | WeightedLayerer | ||
weight : DataProvider
Provides the edge weights. | WeightedLayerer |
Method | Defined By | ||
---|---|---|---|
WeightedLayerer(init:Boolean = true)
Creates a new weighted layerer. | WeightedLayerer | ||
WeightedLayerer | |||
Assign the layers to the nodes. | WeightedLayerer | ||
Assigns the layers to the nodes. | WeightedLayerer | ||
This method assigns the nodes in the graph to layers. | WeightedLayerer | ||
This method assigns the nodes in the graph to layers. | WeightedLayerer | ||
assignNodeLayerWithWeights(g:LayoutGraph, layer:NodeMap, reversedEdges:EdgeList, w:DataProvider):int
This method assigns the nodes in the graph to layers. | WeightedLayerer | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | WeightedLayerer | ||
hashCode():int | YObject | ||
Uses dfs to remove cycles from the graph. | WeightedLayerer | ||
Uses dfs to remove cycles from the graph. | WeightedLayerer | ||
[static]
Creates a new weighted layerer. | WeightedLayerer | ||
newWeightedLayerer2(k:Object):WeightedLayerer [static]
Creates a new weighted layerer. | WeightedLayerer |
Method | Defined By | ||
---|---|---|---|
Pushes the nodes down, drawings seems then to be nicer. | WeightedLayerer | ||
Returns the edge weight of the specified edge for use with the weight based cycle removal heuristic. | WeightedLayerer | ||
initWeightedLayerer1():void
Initializes this object. | WeightedLayerer | ||
initWeightedLayerer2(k:Object):void
Initializes this object. | WeightedLayerer |
key | property |
protected var key:Object
The key to access the weights.
maximalDuration | property |
maximalDuration:uint
Getter: Returns the time limit (in milliseconds) set for the algorithm.
Setter: Sets a preferred time limit (in milliseconds) for the algorithm. Note that restricting the maximal duration may result in a worse layout quality. Furthermore, the real runtime may exceed the maximal duration since the algorithm still have to find a valid solution. public function get maximalDuration():uint
public function set maximalDuration(value:uint):void
weight | property |
protected var weight:DataProvider
Provides the edge weights.
weightedCycleRemoval | property |
weightedCycleRemoval:Boolean
Getter:
Returns true
if the edges that need to be reversed are determined using an edge weight based heuristic and false
if a Depth First Search based approach should be used.
The weight based approach may result in fewer reversed edges (especially for cases with many multi edges) whereas the DFS based approach is likely to be faster.
Defaults to false
.
By default, the DFS based approach is used.
public function get weightedCycleRemoval():Boolean
public function set weightedCycleRemoval(value:Boolean):void
WeightedLayerer | () | Constructor |
public function WeightedLayerer(init:Boolean = true)
Creates a new weighted layerer.
Parametersinit:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
assignLayers | () | method |
public function assignLayers(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void
Parameters
graph:LayoutGraph | |
layers:Layers | |
ldp:LayoutDataProvider |
assignLayersFast | () | method |
public function assignLayersFast(g:Graph, layer:NodeMap):int
Assign the layers to the nodes.
Parameters
g:Graph | |
layer:NodeMap |
int |
assignLayersToNodes | () | method |
public function assignLayersToNodes(g:Graph, layer:NodeMap):int
Assigns the layers to the nodes.
Parameters
g:Graph | |
layer:NodeMap |
int |
assignNodeLayer | () | method |
public function assignNodeLayer(g:LayoutGraph, layer:NodeMap, reversedEdges:EdgeList):int
This method assigns the nodes in the graph to layers.
Postcondition Forall (v,w) in E: layer(v) < layer(w)
Parameters
g:LayoutGraph — the graph for which the layers are determined.
| |
layer:NodeMap — here the layers are stored
| |
reversedEdges:EdgeList — here the edges are stored which had been reversed.
|
int — the number of layers
|
assignNodeLayerForGraph | () | method |
public function assignNodeLayerForGraph(g:Graph, layer:NodeMap, reversedEdges:EdgeList, w:DataProvider):int
This method assigns the nodes in the graph to layers.
Postcondition Forall (v,w) in E: layer(v) < layer(w)
Parameters
g:Graph — the graph for which the layers are determined.
| |
layer:NodeMap — here the layers are stored
| |
reversedEdges:EdgeList — here the edges are stored which had been reversed.
| |
w:DataProvider |
int — the number of layers
|
assignNodeLayerWithWeights | () | method |
public function assignNodeLayerWithWeights(g:LayoutGraph, layer:NodeMap, reversedEdges:EdgeList, w:DataProvider):int
This method assigns the nodes in the graph to layers.
Postcondition Forall (v,w) in E: layer(v) < layer(w)
Parameters
g:LayoutGraph — the graph for which the layers are determined.
| |
layer:NodeMap — here the layers are stored
| |
reversedEdges:EdgeList — here the edges are stored which had been reversed.
| |
w:DataProvider |
int — the number of layers
|
downShiftNodes | () | method |
protected function downShiftNodes(g:Graph, LAYER_KEY:NodeMap, maxLayer:int):void
Pushes the nodes down, drawings seems then to be nicer.
Parameters
g:Graph | |
LAYER_KEY:NodeMap | |
maxLayer:int |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getWeight | () | method |
protected function getWeight(edge:Edge):Number
Returns the edge weight of the specified edge for use with the weight based cycle removal heuristic.
By default, all edges are considered to have weight 1.0
.
Parameters
edge:Edge — the edge whose weight is returned.
|
Number — the edge weight of the specified edge.
|
See also
initWeightedLayerer1 | () | method |
protected final function initWeightedLayerer1():void
Initializes this object. See the documentation of the corresponding factory method newWeightedLayerer1()
for details.
See also
initWeightedLayerer2 | () | method |
protected final function initWeightedLayerer2(k:Object):void
Initializes this object. See the documentation of the corresponding factory method newWeightedLayerer2()
for details.
Parameters
k:Object |
See also
makeDFSAcyclic | () | method |
public function makeDFSAcyclic(g:LayoutGraph, reversedEdges:EdgeList):void
Uses dfs to remove cycles from the graph.
Parameters
g:LayoutGraph | |
reversedEdges:EdgeList |
makeDFSAcyclic2 | () | method |
public function makeDFSAcyclic2(g:Graph, reversedEdges:EdgeList):void
Uses dfs to remove cycles from the graph.
Parameters
g:Graph | |
reversedEdges:EdgeList |
newWeightedLayerer1 | () | method |
public static function newWeightedLayerer1():WeightedLayerer
Creates a new weighted layerer.
ReturnsWeightedLayerer |
newWeightedLayerer2 | () | method |
public static function newWeightedLayerer2(k:Object):WeightedLayerer
Creates a new weighted layerer.
Parameters
k:Object — the key to access the weights.
|
WeightedLayerer |