Package | com.yworks.yfiles.layout.router.polyline |
Class | public class DynamicObstacleDecomposition |
Inheritance | DynamicObstacleDecomposition YObject Object |
Implements | ObstaclePartition, DynamicDecomposition |
The partitioning strategy is based on binary space partitioning. It divides the partition space recursively in two cells until each cell is completely covered from one or more obstacles or completely empty.
See also
Property | Defined By | ||
---|---|---|---|
bounds : YRectangle [read-only]
Returns the bounds of the decomposition area. | DynamicObstacleDecomposition | ||
cutObstacleCost : Number
Specifies the costs incurred for every obstacle that must be cut in a subdivision. | DynamicObstacleDecomposition | ||
unbalancedObstaclesCost : Number
Specifies the costs incurred if the distribution after a subdivision of obstacles is unbalanced in sub-cells. | DynamicObstacleDecomposition | ||
unbalancedRatioCost : Number
Specifies the costs incurred if the subdivision produces unbalanced rectangles. | DynamicObstacleDecomposition |
Method | Defined By | ||
---|---|---|---|
DynamicObstacleDecomposition(init:Boolean = true)
Constructs a dynamic obstacle decomposition. | DynamicObstacleDecomposition | ||
addDynamicDecompositionListener(listener:DynamicDecomposition_Listener):void
Adds the given dynamic decomposition listener to receive com.yworks.yfiles.layout.router.polyline.PartitionCell subdivision and creation events from this decomposition. | DynamicObstacleDecomposition | ||
clear():void | DynamicObstacleDecomposition | ||
equals(o:Object):Boolean | YObject | ||
Returns the com.yworks.yfiles.layout.router.polyline.PartitionCell s in which the given rectangle lies. | DynamicObstacleDecomposition | ||
Returns all cells that are completely covered by the given obstacle. | DynamicObstacleDecomposition | ||
getClass():Class [override] | DynamicObstacleDecomposition | ||
Returns the already existing (leaf) com.yworks.yfiles.layout.router.polyline.PartitionCell s within the given rectangle. | DynamicObstacleDecomposition | ||
Returns the neighbor cells of the given cell. | DynamicObstacleDecomposition | ||
Returns all obstacles that cover the given partition cell. | DynamicObstacleDecomposition | ||
hashCode():int | YObject | ||
Initializes this dynamic obstacle decomposition with the given obstacles and partition bounds. | DynamicObstacleDecomposition | ||
[static]
Constructs a dynamic obstacle decomposition. | DynamicObstacleDecomposition | ||
removeDynamicDecompositionListener(listener:DynamicDecomposition_Listener):void
Removes the given dynamic decomposition listener so that it no longer receives com.yworks.yfiles.layout.router.polyline.PartitionCell subdivision and creation events from this decomposition. | DynamicObstacleDecomposition |
Method | Defined By | ||
---|---|---|---|
fireCreateCellEvent(createdCell:PartitionCell):void
Notifies all registered dynamic decomposition listeners about the newly created cell. | DynamicObstacleDecomposition | ||
fireFinalizeCellEvent(finalizedCell:PartitionCell):void
Notifies all registered dynamic decomposition listeners about the finalized cell. | DynamicObstacleDecomposition | ||
Notifies all registered dynamic decomposition listeners about a subdivision. | DynamicObstacleDecomposition | ||
getGeometricCutCosts(cut:Number, min:Number, max:Number, orthogonalMin:Number, orthogonalMax:Number):Number
Calculates the cost of a cut with respect to the geometry of the sub-cells. | DynamicObstacleDecomposition | ||
getObstacleCutCosts(numObstaclesInFirstHalf:int, numObstaclesInSecondHalf:int, numObstaclesOnCut:int):Number
Calculates the cost of a cut with respect to the subdivided obstacles. | DynamicObstacleDecomposition | ||
Initializes this object. | DynamicObstacleDecomposition |
bounds | property |
bounds:YRectangle
[read-only] Returns the bounds of the decomposition area.
public function get bounds():YRectangle
cutObstacleCost | property |
cutObstacleCost:Number
Specifies the costs incurred for every obstacle that must be cut in a subdivision.
public function get cutObstacleCost():Number
public function set cutObstacleCost(value:Number):void
unbalancedObstaclesCost | property |
unbalancedObstaclesCost:Number
Specifies the costs incurred if the distribution after a subdivision of obstacles is unbalanced in sub-cells.
public function get unbalancedObstaclesCost():Number
public function set unbalancedObstaclesCost(value:Number):void
unbalancedRatioCost | property |
unbalancedRatioCost:Number
Specifies the costs incurred if the subdivision produces unbalanced rectangles.
public function get unbalancedRatioCost():Number
public function set unbalancedRatioCost(value:Number):void
DynamicObstacleDecomposition | () | Constructor |
public function DynamicObstacleDecomposition(init:Boolean = true)
Constructs a dynamic obstacle decomposition.
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.
|
addDynamicDecompositionListener | () | method |
public function addDynamicDecompositionListener(listener:DynamicDecomposition_Listener):void
Adds the given dynamic decomposition listener to receive com.yworks.yfiles.layout.router.polyline.PartitionCell subdivision and creation events from this decomposition. These events occur when the decomposition changes the partition by subdividing cells into sub-cells or new cell are created.
Parameters
listener:DynamicDecomposition_Listener — the dynamic decomposition listener.
|
See also
clear | () | method |
public function clear():void
fireCreateCellEvent | () | method |
protected function fireCreateCellEvent(createdCell:PartitionCell):void
Notifies all registered dynamic decomposition listeners about the newly created cell.
Parameters
createdCell:PartitionCell — The newly created cell.
|
See also
fireFinalizeCellEvent | () | method |
protected function fireFinalizeCellEvent(finalizedCell:PartitionCell):void
Notifies all registered dynamic decomposition listeners about the finalized cell.
Parameters
finalizedCell:PartitionCell — The cell that has been finalized.
|
See also
fireSubdividedEvent | () | method |
protected function fireSubdividedEvent(cell:PartitionCell, subCells:List):void
Notifies all registered dynamic decomposition listeners about a subdivision.
Parameters
cell:PartitionCell — The cell that has been subdivided.
| |
subCells:List — The new sub cells of the divided cell.
|
See also
getCells | () | method |
public function getCells(rect:YRectangle):List
Returns the com.yworks.yfiles.layout.router.polyline.PartitionCell s in which the given rectangle lies.
Parameters
rect:YRectangle — The rectangle to get the cells for.
|
List — The cells in which the given rectangle lies.
|
See also
getCells2 | () | method |
public function getCells2(obstacle:Obstacle):List
Returns all cells that are completely covered by the given obstacle.
Parameters
obstacle:Obstacle — The obstacle to get the covered cells for.
|
List — An unmodifiable list of com.yworks.yfiles.layout.router.polyline.PartitionCell instances that are completely covered by the given obstacle.
|
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getExistingCells | () | method |
public function getExistingCells(rect:YRectangle):List
Returns the already existing (leaf) com.yworks.yfiles.layout.router.polyline.PartitionCell s within the given rectangle.
Parameters
rect:YRectangle — The rectangle to get the cells for.
|
List — The cells in which the given rectangle lies.
|
See also
getGeometricCutCosts | () | method |
protected function getGeometricCutCosts(cut:Number, min:Number, max:Number, orthogonalMin:Number, orthogonalMax:Number):Number
Calculates the cost of a cut with respect to the geometry of the sub-cells. The cost ranges between 0 and 1.
Parameters
cut:Number — The coordinate of the cut.
| |
min:Number — The left side of the subdivided cell.
| |
max:Number — The right side of the subdivided cell.
| |
orthogonalMin:Number — The upper side of the subdivided cell.
| |
orthogonalMax:Number — The lower side of the subdivided cell.
|
Number — Costs of a cut with respect to the geometry of the sub-cells.
|
getNeighbors | () | method |
public function getNeighbors(cell:PartitionCell):List
Returns the neighbor cells of the given cell.
Parameters
cell:PartitionCell — The cell to get the neighbors for.
|
List — The neighbor cells of the given cell.
|
getObstacleCutCosts | () | method |
protected function getObstacleCutCosts(numObstaclesInFirstHalf:int, numObstaclesInSecondHalf:int, numObstaclesOnCut:int):Number
Calculates the cost of a cut with respect to the subdivided obstacles. The cost ranges between 0 and 1.
Parameters
numObstaclesInFirstHalf:int — The number of obstacles that lie completely in the first half.
| |
numObstaclesInSecondHalf:int — The number of obstacles that lie completely in the second half.
| |
numObstaclesOnCut:int — The number of obstacles that lie on the cut.
|
Number — Costs of a cut with respect to the subdivided obstacles.
|
getObstacles | () | method |
public function getObstacles(cell:PartitionCell):List
Returns all obstacles that cover the given partition cell.
Parameters
cell:PartitionCell — The cell to get the obstacles for.
|
List — An unmodifiable list of com.yworks.yfiles.layout.router.polyline.Obstacle instances that cover the given cell.
|
See also
init | () | method |
public function init(obstacles:List, partitionBounds:YRectangle):void
Initializes this dynamic obstacle decomposition with the given obstacles and partition bounds. This method must be called before any other method is invoked.
Parameters
obstacles:List — A list of com.yworks.yfiles.layout.router.polyline.Obstacle objects.
| |
partitionBounds:YRectangle — The bounds of the partition.
|
See also
initDynamicObstacleDecomposition | () | method |
protected final function initDynamicObstacleDecomposition():void
Initializes this object. See the documentation of the corresponding factory method newDynamicObstacleDecomposition()
for details.
See also
newDynamicObstacleDecomposition | () | method |
public static function newDynamicObstacleDecomposition():DynamicObstacleDecomposition
Constructs a dynamic obstacle decomposition.
ReturnsDynamicObstacleDecomposition |
removeDynamicDecompositionListener | () | method |
public function removeDynamicDecompositionListener(listener:DynamicDecomposition_Listener):void
Removes the given dynamic decomposition listener so that it no longer receives com.yworks.yfiles.layout.router.polyline.PartitionCell subdivision and creation events from this decomposition.
Parameters
listener:DynamicDecomposition_Listener — the dynamic decomposition listener.
|
See also