skyview.util
Class LinearScaler

java.lang.Object
  extended by skyview.util.Scaler
      extended by skyview.util.LinearScaler

public class LinearScaler
extends Scaler

Scale an object linearly.


Constructor Summary
LinearScaler()
           
LinearScaler(double minVal, double maxVal, int minOutput, int maxOutput)
          Provide a scaler with a specified scaling range to a specified range of bytes.
 
Method Summary
protected  void prepareScaling(double[] c)
          Set up the scaling.
protected  byte scale(double val)
          Scale a single value
 
Methods inherited from class skyview.util.Scaler
getMaxOutput, getMaxVal, getMinOutput, getMinVal, getUseDefault, scaleArray, setMaxVal, setMinMax, setMinVal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearScaler

public LinearScaler()

LinearScaler

public LinearScaler(double minVal,
                    double maxVal,
                    int minOutput,
                    int maxOutput)
Provide a scaler with a specified scaling range to a specified range of bytes.

Method Detail

prepareScaling

protected void prepareScaling(double[] c)
Set up the scaling.

Specified by:
prepareScaling in class Scaler
Parameters:
The - array to be scaled.

scale

protected final byte scale(double val)
Scale a single value

Specified by:
scale in class Scaler
Parameters:
val - The value to be scaled.
Returns:
The scaled value.