public class LinearScalerImpl extends Object implements LinearScaler, Serializable
| Constructor and Description | 
|---|
LinearScalerImpl(double min,
                double max)
Construct a scaler. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
double | 
byteDiffSumToDouble(long diffSum)
Scale the sum of differences of bytes into double. 
 | 
double | 
byteDomainToDouble(double b)
Scale byte domain representation to the original. 
 | 
double | 
byteSqrDiffSumToDouble(long diffSqrSum)
Scale the square sum of differences of bytes into double. 
 | 
float[] | 
bytesToFloats(byte[] b)
Map  
LinearScaler.byteToFloat(byte) to an array. | 
float | 
byteToFloat(byte b)
Scale byte representation to float. 
 | 
byte[] | 
floatsToBytes(float[] f)
Map  
LinearScaler.floatToByte(float) to an array. | 
short[] | 
floatsToShorts(float[] f)
Map  
LinearScaler.floatToShort(float) to an array. | 
byte | 
floatToByte(float f)
Scale float into the byte representation. 
 | 
short | 
floatToShort(float f)
Scale float into the short representation. 
 | 
double | 
shortDiffSumToDouble(long diffSum)
Scale the sum of differences of shorts into double. 
 | 
double | 
shortDomainToDouble(double s)
Scale short domain representation to the original. 
 | 
double | 
shortSqrDiffSumToDouble(long diffSqrSum)
Scale the square sum of differences of shorts into double. 
 | 
float[] | 
shortsToFloats(short[] s)
Map  
LinearScaler.shortToFloat(short) to an array. | 
float | 
shortToFloat(short s)
Scale short representation to float. 
 | 
String | 
toString()  | 
public LinearScalerImpl(double min,
                        double max)
min - Lower bound of the represented floating points range\max - Upper bound of the represented floating points range\public float byteToFloat(byte b)
LinearScalerbyteToFloat in interface LinearScalerb - Byte representation to scale.public float[] bytesToFloats(byte[] b)
LinearScalerLinearScaler.byteToFloat(byte) to an array.bytesToFloats in interface LinearScalerb - Array of bytespublic float shortToFloat(short s)
LinearScalershortToFloat in interface LinearScalers - Short to scalepublic float[] shortsToFloats(short[] s)
LinearScalerLinearScaler.shortToFloat(short) to an array.shortsToFloats in interface LinearScalers - Array of shortspublic byte floatToByte(float f)
LinearScalerfloatToByte in interface LinearScalerf - Float valuepublic byte[] floatsToBytes(float[] f)
LinearScalerLinearScaler.floatToByte(float) to an array.floatsToBytes in interface LinearScalerf - Array of floatspublic short floatToShort(float f)
LinearScalerfloatToShort in interface LinearScalerf - Float valuepublic short[] floatsToShorts(float[] f)
LinearScalerLinearScaler.floatToShort(float) to an array.floatsToShorts in interface LinearScalerf - Array of floatspublic double byteDiffSumToDouble(long diffSum)
LinearScalerbyteDiffSumToDouble in interface LinearScalerdiffSum - Sum of the differences of byte representationspublic double byteSqrDiffSumToDouble(long diffSqrSum)
LinearScalerbyteSqrDiffSumToDouble in interface LinearScalerdiffSqrSum - Sum of the differences of byte representationspublic double shortDiffSumToDouble(long diffSum)
LinearScalershortDiffSumToDouble in interface LinearScalerdiffSum - Sum of the differences of byte representationspublic double shortSqrDiffSumToDouble(long diffSqrSum)
LinearScalershortSqrDiffSumToDouble in interface LinearScalerdiffSqrSum - Sum of the differences of byte representationspublic double byteDomainToDouble(double b)
LinearScalerbyteDomainToDouble in interface LinearScalerb - Value in scaled byte domain.public double shortDomainToDouble(double s)
LinearScalershortDomainToDouble in interface LinearScalers - Value in scaled short domain.