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,
int nSamples) |
protected static void |
writeDoubleArrayToByteBuffer(ByteBuffer byteBuffer,
double[] doubleBuffer,
int nSamples) |
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 StringBuilder getCachedStringBuilder(String arrayName, int size)
protected static double integralSimple(DataSet function)
protected static double mean(double[] data)
data - the input vectorprotected 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)
data - the input vectorpublic static double[] toDoubleArray(float[] input)
input - float array inputpublic static float[] toFloatArray(double[] input)
input - double array inputprotected static void writeDoubleArrayAsFloatToByteBuffer(ByteBuffer byteBuffer, double[] doubleBuffer, int nSamples)
protected static void writeDoubleArrayToByteBuffer(ByteBuffer byteBuffer, double[] doubleBuffer, int nSamples)
Copyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.