|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.math.AbstractScaler
org.vizzini.math.LinearScaler
public class LinearScaler
Provides functionality to linearly scale numbers between two ranges.
Constructor Summary | |
---|---|
LinearScaler()
Construct this object. |
|
LinearScaler(double minInput,
double maxInput,
double minOutput,
double maxOutput)
Construct this object with the given parameters. |
Method Summary | |
---|---|
double |
scale(double input)
Scale the given input to the output range. |
void |
setMaxInput(double max)
Set the maximum expected input value. |
void |
setMaxOutput(double max)
Set the maximum expected output value. |
void |
setMinInput(double min)
Set the minimum expected input value. |
void |
setMinOutput(double min)
Set the minimum expected output value. |
double |
unscale(double output)
Unscale the given output to the input range. |
Methods inherited from class org.vizzini.math.AbstractScaler |
---|
getConfiguration, getMaxInput, getMaxOutput, getMinInput, getMinOutput, scale, scale, toString, unscale |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LinearScaler()
public LinearScaler(double minInput, double maxInput, double minOutput, double maxOutput)
minInput
- Minimum expected input.maxInput
- Maximum expected input.minOutput
- Minimum expected output.maxOutput
- Maximum expected output.Method Detail |
---|
public void setMaxInput(double max)
setMaxInput
in interface IScaler
setMaxInput
in class AbstractScaler
public void setMaxOutput(double max)
setMaxOutput
in interface IScaler
setMaxOutput
in class AbstractScaler
public void setMinInput(double min)
setMinInput
in interface IScaler
setMinInput
in class AbstractScaler
public void setMinOutput(double min)
setMinOutput
in interface IScaler
setMinOutput
in class AbstractScaler
public double scale(double input)
public double unscale(double output)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |