Package com.actelion.research.util
Class EncoderFloatingPointNumbers
- java.lang.Object
-
- com.actelion.research.util.EncoderFloatingPointNumbers
-
public class EncoderFloatingPointNumbers extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description EncoderFloatingPointNumbers(double[] arrValue, int precisionBits)
More values can be added after the constructor was called.EncoderFloatingPointNumbers(float[] arrValue, int precisionBits)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double[]
decode(java.lang.String strData)
static java.lang.String
encode(double[] arrValue, int precisionBits)
Convenience method to encode a array with a given precision.static java.lang.String
encode(float[] arrValue, int precisionBits)
static void
main(java.lang.String[] args)
-
-
-
Constructor Detail
-
EncoderFloatingPointNumbers
public EncoderFloatingPointNumbers(double[] arrValue, int precisionBits)
More values can be added after the constructor was called. However, the must not exceed the min and the max value found in arrValue.- Parameters:
arrValue
- array with the values that will be encoded. Determines also minimum and maximum encoding value.precisionBits
-
-
EncoderFloatingPointNumbers
public EncoderFloatingPointNumbers(float[] arrValue, int precisionBits)
-
-
Method Detail
-
decode
public static double[] decode(java.lang.String strData)
- Parameters:
strData
-- Returns:
- array with decoded values.
-
encode
public static java.lang.String encode(double[] arrValue, int precisionBits)
Convenience method to encode a array with a given precision.- Parameters:
arrValue
-precisionBits
-- Returns:
-
encode
public static java.lang.String encode(float[] arrValue, int precisionBits)
-
main
public static void main(java.lang.String[] args)
-
-