|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.utilities.scaling.LinearScaling
public class LinearScaling
Simple linear scaling function.
Field Summary | |
---|---|
private double |
factor
Scaling factor |
private double |
shift
Shift |
Constructor Summary | |
---|---|
LinearScaling()
Constructor with defaults resulting in identity. |
|
LinearScaling(double factor)
Constructor with scaling only. |
|
LinearScaling(double factor,
double shift)
Full constructor. |
|
LinearScaling(DoubleMinMax minmax)
Constructor from a double minmax. |
Method Summary | |
---|---|
static LinearScaling |
fromMinMax(double min,
double max)
Make a linear scaling from a given minimum and maximum. |
double |
getMax()
Get maximum resulting value. |
double |
getMin()
Get minimum resulting value. |
double |
getScaled(double d)
Transform a given value using the scaling function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private double factor
private double shift
Constructor Detail |
---|
public LinearScaling()
public LinearScaling(double factor)
factor
- Scaling factorpublic LinearScaling(double factor, double shift)
factor
- Scaling factorshift
- Shift valuepublic LinearScaling(DoubleMinMax minmax)
minmax
- Minimum and MaximumMethod Detail |
---|
public double getScaled(double d)
ScalingFunction
getScaled
in interface ScalingFunction
d
- Original value
public double getMin()
ScalingFunction
Double.NaN
or
Double.NEGATIVE_INFINITY
.
getMin
in interface ScalingFunction
public double getMax()
ScalingFunction
Double.NaN
or
Double.POSITIVE_INFINITY
.
getMax
in interface ScalingFunction
public static LinearScaling fromMinMax(double min, double max)
min
- Minimummax
- Maximum
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |