Search this API

y.layout.router.polyline
Interface ObstaclePartition

All Superinterfaces:
Partition
All Known Implementing Classes:
DynamicObstacleDecomposition

public interface ObstaclePartition
extends Partition

A Partition that takes a list of Obstacles as input to subdivide an area into PartitionCells.

Implementations have to satisfy the following condition for each pair of obstacle and partition cell:
Obstacles either completely cover partition cells or do not intersect partition cells at all.

Fig 1: Example of an obstacle partition of a graph consisting of two gray colored nodes connected by one edge. The two nodes are considered to be obstacles. The blue colored partition cells subdivide the area such that each obstacle either completely covers a partition cell or do not intersect with a partition cell.


Method Summary
 void clear()
          Clears the partition data so the ObstaclePartition can be reused and init(java.util.List, y.geom.YRectangle) initialized} with new Obstacles.
 List getCells(Obstacle obstacle)
          Returns all partition cells that are completely covered by the given obstacle.
 List getObstacles(PartitionCell cell)
          Returns all obstacles that cover the given partition cell.
 void init(List obstacles, YRectangle bounds)
          Initializes a new partition of the area with the given bounds using the list of Obstacles.
 
Methods inherited from interface y.layout.router.polyline.Partition
getBounds, getCells, getNeighbors
 

Method Detail

init

void init(List obstacles,
          YRectangle bounds)
Initializes a new partition of the area with the given bounds using the list of Obstacles.

Parameters:
obstacles - A list of Obstacles that shall be considered by the partition.
bounds - The bounds of the partition.

getObstacles

List getObstacles(PartitionCell cell)
Returns all obstacles that cover the given partition cell.

Parameters:
cell - The cell to get the obstacles for.
Returns:
A list of Obstacles that cover the given cell.

getCells

List getCells(Obstacle obstacle)
Returns all partition cells that are completely covered by the given obstacle.

Parameters:
obstacle - The obstacle to get the covered cells for.
Returns:
A list of PartitionCells that are covered by the given obstacle.

clear

void clear()
Clears the partition data so the ObstaclePartition can be reused and init(java.util.List, y.geom.YRectangle) initialized} with new Obstacles.


© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.