Package skyview.util
Class LogScaler
java.lang.Object
skyview.util.Scaler
skyview.util.LogScaler
Scale an object linearly.
-
Constructor Summary
ConstructorsConstructorDescriptionProvide default scaler that positive values will scale the array logarithmically between 0-255.LogScaler
(double minVal, double maxVal, int minOutput, int maxOutput, boolean scaleNegative) Provide a scaler with a specified scaling range to a specified range of bytes. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
prepareScaling
(double[] c) Prepare to scale the dataprotected byte
scale
(double val) Scale an value.Methods inherited from class skyview.util.Scaler
getMaxOutput, getMaxVal, getMinOutput, getMinVal, getUseDefault, scaleArray, setMaxVal, setMinMax, setMinVal
-
Constructor Details
-
LogScaler
public LogScaler()Provide default scaler that positive values will scale the array logarithmically between 0-255. -
LogScaler
public LogScaler(double minVal, double maxVal, int minOutput, int maxOutput, boolean scaleNegative) Provide a scaler with a specified scaling range to a specified range of bytes.
-
-
Method Details
-
prepareScaling
protected void prepareScaling(double[] c) Prepare to scale the data- Specified by:
prepareScaling
in classScaler
- Parameters:
c
- Array to be scaled.
-
scale
protected byte scale(double val) Scale an value.
-