Search this API

y.layout.router.polyline
Interface ObstaclePartition

All Superinterfaces:
Partition
All Known Implementing Classes:
DynamicObstacleDecomposition

public interface ObstaclePartition
extends Partition

This class implements 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 PartitionCell:


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

 

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

Method Detail

init

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

Unused partitions must be cleared using method clear().

Parameters:
obstacles - a list of Obstacles that have to be considered by the partition
bounds - the bounds of the partition
See Also:
clear()

getObstacles

java.util.List getObstacles(PartitionCell cell)
Returns all Obstacles that cover the given PartitionCell.

Parameters:
cell - the partition cell for which the obstacles will be returned
Returns:
an unmodifiable list of Obstacle instances that cover the given cell

getCells

java.util.List getCells(Obstacle obstacle)
Returns all PartitionCells that are completely covered by the given Obstacle.

Parameters:
obstacle - the obstacle for which the covered cells will be returned
Returns:
an unmodifiable list of PartitionCell instances that are completely covered by the given obstacle

clear

void clear()
Clears the partition data such that the ObstaclePartition can be reused and initialized with new Obstacles.

See Also:
init(List, YRectangle)

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