|
||||||||||
| 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 IScalersetMaxInput in class AbstractScalerpublic void setMaxOutput(double max)
setMaxOutput in interface IScalersetMaxOutput in class AbstractScalerpublic void setMinInput(double min)
setMinInput in interface IScalersetMinInput in class AbstractScalerpublic void setMinOutput(double min)
setMinOutput in interface IScalersetMinOutput in class AbstractScalerpublic 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 |