uk.ac.starlink.ttools.plot2.layer
Class CountScaler

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.layer.CountScaler

public class CountScaler
extends Object

Scales integer count values according to a supplied Scaling object.

Since:
26 Jan 2015
Author:
Mark Taylor

Constructor Summary
CountScaler(Scaling scaling, int maxIn, int maxOut)
          Constructor.
 
Method Summary
 int scaleCount(int count)
          Scales in input whole number to an output whole number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountScaler

public CountScaler(Scaling scaling,
                   int maxIn,
                   int maxOut)
Constructor.

Parameters:
scaling - provides basic scaling behaviour
maxIn - defines input value range 0..maxIn
maxOut - defines output value range 0..maxOut
Method Detail

scaleCount

public int scaleCount(int count)
Scales in input whole number to an output whole number. Zero maps to zero, other values map according to this object's Scaling.

Parameters:
count - unscaled value, in range 0..maxIn
Returns:
scaled count, in range 0..maxOut


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.