public class SimpleTileRectangle extends TileRectangle
TileRectangle
that uses Row/Column indices for storage. Fast, but not relocatable.Constructor and Description |
---|
SimpleTileRectangle() |
SimpleTileRectangle(int minColumn,
int maxColumn,
int minRow,
int maxRow) |
SimpleTileRectangle(SimpleTileRectangle rect) |
Modifier and Type | Method and Description |
---|---|
static Collector<Tile,?,SimpleTileRectangle> |
collector() |
void |
extendTo(RelocatableTileRectangle rect)
Extend the Rectangle so that the specified Rectangle is inside
|
void |
extendTo(Tile tile)
Extend the Rectangle so that the specified Tile is inside
|
void |
extendTo(TileRectangle rect)
Extend the Rectangle so that the specified Rectangle is inside
|
void |
extendToCorresponding(RelocatableTileRectangle rect,
Site currentAnchor,
SiteInst templateAnchor)
Extend the Rectangle so that a shifted rectangle is inside.
|
int |
getMaxColumn() |
int |
getMaxRow() |
int |
getMinColumn() |
int |
getMinRow() |
boolean |
isEmpty() |
static SimpleTileRectangle |
of(Tile... tiles) |
extendToCorresponding, getCenter, getHeight, getLargerDimension, getWidth, hpwl, isInside, overlaps
public SimpleTileRectangle()
public SimpleTileRectangle(int minColumn, int maxColumn, int minRow, int maxRow)
public SimpleTileRectangle(SimpleTileRectangle rect)
public static Collector<Tile,?,SimpleTileRectangle> collector()
public void extendTo(Tile tile)
extendTo
in class TileRectangle
tile
- The tile to includepublic void extendTo(RelocatableTileRectangle rect)
extendTo
in class TileRectangle
rect
- The Rectangle to includepublic void extendTo(TileRectangle rect)
rect
- The Rectangle to includepublic void extendToCorresponding(RelocatableTileRectangle rect, Site currentAnchor, SiteInst templateAnchor)
templateAnchor
to currentAnchor
. This location relative to the new
anchor is then included in the Rectangle.extendToCorresponding
in class TileRectangle
rect
- Rectangle to include after shiftingcurrentAnchor
- target anchortemplateAnchor
- source anchorpublic int getMinColumn()
getMinColumn
in class TileRectangle
public int getMaxColumn()
getMaxColumn
in class TileRectangle
public int getMinRow()
getMinRow
in class TileRectangle
public int getMaxRow()
getMaxRow
in class TileRectangle
public boolean isEmpty()
isEmpty
in class TileRectangle
public static SimpleTileRectangle of(Tile... tiles)