Package elki.result
Class ScalesResult
- java.lang.Object
-
- elki.result.ScalesResult
-
public class ScalesResult extends java.lang.Object
Class to keep shared scales across visualizers.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private LinearScale[]
scales
The scales in use.
-
Constructor Summary
Constructors Constructor Description ScalesResult(Relation<? extends SpatialComparable> relation)
Constructor.ScalesResult(LinearScale[] scales)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LinearScale
getScale(int dim)
Get the scale for dimension dim (starting at 1!).LinearScale[]
getScales()
Get all scales.static ScalesResult
getScalesResult(Relation<? extends SpatialComparable> rel)
Get (or create) a scales result for a relation.void
setScale(int dim, LinearScale scale)
Set the scale for dimension dim (starting at 1!).
-
-
-
Field Detail
-
scales
private LinearScale[] scales
The scales in use.
-
-
Constructor Detail
-
ScalesResult
public ScalesResult(Relation<? extends SpatialComparable> relation)
Constructor.- Parameters:
relation
- Relation to use
-
ScalesResult
public ScalesResult(LinearScale[] scales)
Constructor.- Parameters:
scales
- Relation scales to use
-
-
Method Detail
-
getScale
public LinearScale getScale(int dim)
Get the scale for dimension dim (starting at 1!).- Parameters:
dim
- Dimension- Returns:
- Scale
-
setScale
public void setScale(int dim, LinearScale scale)
Set the scale for dimension dim (starting at 1!). Note: you still need to trigger an event. This is not done automatically, as you might want to set more than one scale!- Parameters:
dim
- Dimensionscale
- New scale
-
getScales
public LinearScale[] getScales()
Get all scales. Note: you must not modify the array.- Returns:
- Scales array.
-
getScalesResult
public static ScalesResult getScalesResult(Relation<? extends SpatialComparable> rel)
Get (or create) a scales result for a relation.- Parameters:
rel
- Relation- Returns:
- associated scales result
-
-