T
- Key typepublic class RectangleArranger<T> extends Object
Modifier and Type | Field and Description |
---|---|
private DoubleArray |
heights
Column heights
|
private static Logging |
LOG
Logging class
|
private Map<T,double[]> |
map
Data
|
private double |
ratio
Target height/width ratio
|
private double |
theight
Height
|
private double |
twidth
Width
|
private ArrayList<ArrayList<Object>> |
usage
Map indicating which cells are used.
|
private DoubleArray |
widths
Column widths
|
Constructor and Description |
---|
RectangleArranger(double ratio)
Constructor.
|
RectangleArranger(double width,
double height)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
assertConsistent() |
protected double |
computeIncreaseArea(double winc,
double hinc) |
Set<Map.Entry<T,double[]>> |
entrySet()
The items contained in the map.
|
double[] |
get(T object)
Get the position data of the object
|
double |
getHeight()
Get the total canvas height
|
double |
getWidth()
Get the total canvas width
|
Set<T> |
keySet()
The item keys contained in the map.
|
protected void |
logSizes()
Debug logging
|
static void |
main(String[] args)
Test method.
|
void |
put(double w,
double h,
T data)
Add a new recangle.
|
double |
relativeFill()
Compute the relative fill.
|
private void |
resize(double inc) |
protected void |
splitCol(int bestex,
double bestwi) |
protected void |
splitRow(int bestey,
double besthi) |
private static final Logging LOG
private double ratio
private double twidth
private double theight
private DoubleArray widths
private DoubleArray heights
public RectangleArranger(double ratio)
ratio
- public RectangleArranger(double width, double height)
width
- Canvas widthheight
- Canvas heightpublic void put(double w, double h, T data)
w
- Widthh
- Heightdata
- Data object to add (key)protected double computeIncreaseArea(double winc, double hinc)
protected void splitRow(int bestey, double besthi)
protected void splitCol(int bestex, double bestwi)
private void resize(double inc)
public double[] get(T object)
object
- Query objectprivate boolean assertConsistent()
protected void logSizes()
public double relativeFill()
public double getWidth()
public double getHeight()
public Set<Map.Entry<T,double[]>> entrySet()
public static void main(String[] args)
args
- Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.