asu.seismo.signals.utils
Class linScaler

java.lang.Object
  extended by asu.seismo.signals.utils.linScaler
All Implemented Interfaces:
graphScale
Direct Known Subclasses:
maxScaler

public class linScaler
extends java.lang.Object
implements graphScale

Linear scaling function. This function implements a simple affine transform.


Field Summary
protected  double Dmax
           
protected  double Dmin
           
protected  double Smax
           
protected  double Smin
           
 
Constructor Summary
linScaler()
          Construct empty class.
linScaler(double DisplayMin, double DisplayMax, double SignalMin, double SignalMax)
          Initiate Scaling function with given end points of the two intervals.
 
Method Summary
 double d2o(double disp)
          Return o given d
 int io2d(double org)
          Return an integer representation of d given o
 double o2d(double org)
          Return d given o
 void setScale(double DisplayMin, double DisplayMax, double SignalMin, double SignalMax)
          Initiate Scaling function with given end points of the two intervals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Smin

protected double Smin

Smax

protected double Smax

Dmin

protected double Dmin

Dmax

protected double Dmax
Constructor Detail

linScaler

public linScaler()
Construct empty class. SetScale has to be called before this class is used.


linScaler

public linScaler(double DisplayMin,
                 double DisplayMax,
                 double SignalMin,
                 double SignalMax)
Initiate Scaling function with given end points of the two intervals.

Method Detail

setScale

public void setScale(double DisplayMin,
                     double DisplayMax,
                     double SignalMin,
                     double SignalMax)
Initiate Scaling function with given end points of the two intervals.


d2o

public double d2o(double disp)
Return o given d

Specified by:
d2o in interface graphScale

o2d

public double o2d(double org)
Return d given o

Specified by:
o2d in interface graphScale

io2d

public int io2d(double org)
Return an integer representation of d given o

Specified by:
io2d in interface graphScale