public class LinearScale extends Object
Modifier and Type | Field and Description |
---|---|
private double |
delta
Scale delta := max - min
|
private int |
log10res
Scale resolution in log10.
|
private double |
max
max value of the scale
|
private double |
min
min value of the scale
|
private double |
res
Scale resolution
|
private double |
ZOOMFACTOR |
Constructor and Description |
---|
LinearScale(double min,
double max)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
formatValue(double val)
Format value according to the scales resolution (i.e. appropriate number of
digits)
|
double |
getLog10Res()
Get resolution (scale interval size)
|
double |
getMax()
Get maximum value (scale, not data).
|
double |
getMin()
Get minimum value (scale, not data).
|
double |
getRelativeScaled(double val)
Covert a relative value to it's scale position
|
double |
getRelativeScaled(double val,
double smax,
double smin)
Covert a relative value to it's scale position
|
double |
getRelativeUnscaled(double val)
Covert a relative scale position to the actual value
|
double |
getRelativeUnscaled(double val,
double smin,
double smax)
Covert a relative scale position to the actual value
|
double |
getRes()
Get resolution (scale interval size)
|
double |
getScaled(double val)
Covert a value to it's scale position
|
double |
getScaled(double val,
double smin,
double smax)
Covert a value to it's scale position
|
double |
getUnscaled(double val)
Covert a scale position to the actual value
|
double |
getUnscaled(double val,
double smin,
double smax)
Covert a scale position to the actual value
|
private final double ZOOMFACTOR
private double min
private double max
private double res
private int log10res
private double delta
public LinearScale(double min, double max)
min
- actual minimum in the datamax
- actual maximum in the datapublic double getMin()
public double getMax()
public double getRes()
public double getLog10Res()
public double getScaled(double val)
val
- data valuepublic double getUnscaled(double val)
val
- scale position in the interval [0:1]public double getRelativeScaled(double val)
val
- relative data valuepublic double getRelativeUnscaled(double val)
val
- relative scale position in the interval [0:1]public double getScaled(double val, double smin, double smax)
val
- data valuesmin
- target scale minimumsmax
- target scale maximumpublic double getUnscaled(double val, double smin, double smax)
val
- scale position in the interval [smin:smax]smin
- target scale minimumsmax
- target scale maximumpublic double getRelativeScaled(double val, double smax, double smin)
val
- relative data valuesmin
- target scale minimumsmax
- target scale maximumpublic double getRelativeUnscaled(double val, double smin, double smax)
val
- relative scale position in the interval [smin:smax]smin
- target scale minimumsmax
- target scale maximumpublic String formatValue(double val)
val
- ValueCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.