public class DataSetUtilsHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static ReentrantLock |
BYTE_ARRAY_CACHE_LOCK |
protected static WeakHashMap<String,WeakHashMap<Integer,ByteBuffer>> |
byteArrayCache |
protected static ReentrantLock |
STRING_BUFFER_CACHE_LOCK |
protected static WeakHashMap<String,WeakHashMap<Integer,StringBuilder>> |
stringBuilderCache |
| Constructor and Description |
|---|
DataSetUtilsHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected static ByteBuffer |
getCachedDoubleArray(String arrayName,
int size) |
protected static StringBuilder |
getCachedStringBuilder(String arrayName,
int size) |
protected static double |
integralSimple(DataSet function) |
protected static double |
mean(double[] data) |
protected static double[] |
readDoubleArrayFromBuffer(FloatBuffer floatBuffer,
DoubleBuffer doubleBuffer) |
protected static void |
release(String arrayName,
ByteBuffer cachedArray) |
protected static void |
release(String arrayName,
StringBuilder cachedArray) |
protected static double |
rootMeanSquare(double[] data) |
static double[] |
toDoubleArray(float[] input) |
static float[] |
toFloatArray(double[] input) |
protected static void |
writeDoubleArrayAsFloatToByteBuffer(ByteBuffer byteBuffer,
double[] doubleBuffer) |
protected static void |
writeDoubleArrayToByteBuffer(ByteBuffer byteBuffer,
double[] doubleBuffer) |
protected static final ReentrantLock BYTE_ARRAY_CACHE_LOCK
protected static WeakHashMap<String,WeakHashMap<Integer,ByteBuffer>> byteArrayCache
protected static final ReentrantLock STRING_BUFFER_CACHE_LOCK
protected static WeakHashMap<String,WeakHashMap<Integer,StringBuilder>> stringBuilderCache
protected static ByteBuffer getCachedDoubleArray(String arrayName, int size)
protected static void release(String arrayName, ByteBuffer cachedArray)
protected static StringBuilder getCachedStringBuilder(String arrayName, int size)
protected static void release(String arrayName, StringBuilder cachedArray)
public static float[] toFloatArray(double[] input)
input - double array inputpublic static double[] toDoubleArray(float[] input)
input - float array inputprotected static void writeDoubleArrayToByteBuffer(ByteBuffer byteBuffer, double[] doubleBuffer)
protected static void writeDoubleArrayAsFloatToByteBuffer(ByteBuffer byteBuffer, double[] doubleBuffer)
protected static double[] readDoubleArrayFromBuffer(FloatBuffer floatBuffer, DoubleBuffer doubleBuffer)
protected static double integralSimple(DataSet function)
protected static double mean(double[] data)
data - the input vectorprotected static double rootMeanSquare(double[] data)
data - the input vectorCopyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.