public class RelocatableTileRectangle extends TileRectangle
TileRectangle
that is relocatable.
As padding tiles may be inserted when relocating Rectangles, we do not store coordinates of tiles but rather the
tiles themselves. For every border (top/bottom/left/right) we save one example tile. When Relocation is not needed,
use SimpleTileRectangle
instead
Constructor and Description |
---|
RelocatableTileRectangle() |
RelocatableTileRectangle(Tile tile) |
RelocatableTileRectangle(Tile minColumn,
Tile maxColumn,
Tile minRow,
Tile maxRow) |
Modifier and Type | Method and Description |
---|---|
static Collector<Tile,?,RelocatableTileRectangle> |
collector()
Collect a Stream<Tile> to a TileRectangle
|
boolean |
equals(Object o) |
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 |
extendToCorresponding(RelocatableTileRectangle rect,
Site currentAnchor,
SiteInst templateAnchor)
Extend the Rectangle so that a shifted rectangle is inside.
|
void |
extendToCorresponding(Tile tile,
Site currentAnchor,
SiteInst templateAnchor)
Extend the Rectangle so that a shifted tile is inside.
|
RelocatableTileRectangle |
getCorresponding(Tile newAnchor,
Tile originalAnchor) |
int |
getMaxColumn() |
Tile |
getMaxColumnTile() |
int |
getMaxRow() |
Tile |
getMaxRowTile() |
int |
getMinColumn() |
Tile |
getMinColumnTile() |
int |
getMinRow() |
Tile |
getMinRowTile() |
int |
hashCode() |
boolean |
isEmpty() |
static RelocatableTileRectangle |
of(Tile... tiles) |
String |
toString() |
getCenter, getHeight, getLargerDimension, getWidth, hpwl, isInside, overlaps
public RelocatableTileRectangle(Tile tile)
public RelocatableTileRectangle(Tile minColumn, Tile maxColumn, Tile minRow, Tile maxRow)
public RelocatableTileRectangle()
public static Collector<Tile,?,RelocatableTileRectangle> collector()
public static RelocatableTileRectangle of(Tile... tiles)
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public RelocatableTileRectangle getCorresponding(Tile newAnchor, Tile originalAnchor)
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 extendToCorresponding(Tile tile, Site currentAnchor, SiteInst templateAnchor)
templateAnchor
to currentAnchor
. This location relative to the new
anchor is then included in the Rectangle.extendToCorresponding
in class TileRectangle
tile
- tile to include after shiftingcurrentAnchor
- target anchortemplateAnchor
- source anchorpublic 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 getMinRow()
getMinRow
in class TileRectangle
public int getMaxRow()
getMaxRow
in class TileRectangle
public int getMinColumn()
getMinColumn
in class TileRectangle
public int getMaxColumn()
getMaxColumn
in class TileRectangle
public boolean isEmpty()
isEmpty
in class TileRectangle
public Tile getMinColumnTile()
public Tile getMaxColumnTile()
public Tile getMinRowTile()
public Tile getMaxRowTile()