public final class MapFunctions extends Object
MapFunction
Modifier and Type | Field and Description |
---|---|
static MapFunction<float[]> |
AUTO_CORRELATION |
static MapFunction<float[]> |
AUTO_CORRELATION_BIASED
Auto correlation function normalized with the number of samples, i.e.
|
static MapFunction<float[]> |
AUTO_CORRELATION_COEFF
Auto correlation function normalized with the first coefficient (global maximum).
|
static MapFunction<float[]> |
AUTO_CORRELATION_UNBIASED
Auto correlation function normalized with the number of samples minus abs(t),
i.e.
|
Modifier and Type | Method and Description |
---|---|
static MapFunction<float[]> |
createAbsFunction()
Removes sign.
|
static StatefulMapFunction<Float> |
createArithmeticMeanFunction()
Maps consecutive samples to their arithmetic mean.
|
static MapFunction<float[]> |
createDivByMaxNormalization()
Divides all values by the max value in the given buffer.
|
static MapFunction<float[]> |
createEuclideanNormalization()
Divides all values by the Euclidean norm of the the given buffer.
|
static StatefulMapFunction<Float> |
createFractionFunction(float threshold)
Keeps track of values that are below a given threshold and returns the fraction
of values that were below this threshold.
|
static MapFunction<float[]> |
createInterpolateFunction(float shift,
int indicesPerOneShift)
Creates a linear interpolation function.
|
static MapFunction<float[]> |
createReverseFunction()
Reverses the order of the elements in each array.
|
static MapFunction<float[]> |
createShortToOneNormalization()
Assumes that all values are signed 16bit values and divides them by
Short.MAX_VALUE +1 in
order to map them to a range of -1 to 1. |
static MapFunction<float[]> |
createSquareFunction()
Squares all values.
|
static StatefulMapFunction<Float> |
createStandardDeviationFunction()
Maps consecutive samples to their standard deviation.
|
static StatefulMapFunction<Float> |
createTemporalCentroidFunction()
Maps consecutive samples to their temporal centroid.
|
static StatefulMapFunction<Float> |
createVarianceFunction()
Maps consecutive samples to their variance.
|
static MapFunction<float[]> |
createWrapFunction(int length)
Creates wrap function.
|
public static final MapFunction<float[]> AUTO_CORRELATION
xcorr
public static final MapFunction<float[]> AUTO_CORRELATION_COEFF
xcorr(..., 'coeff')
public static final MapFunction<float[]> AUTO_CORRELATION_BIASED
biased(t) = r(t)/N
.xcorr(..., 'biased')
public static final MapFunction<float[]> AUTO_CORRELATION_UNBIASED
unbiased(t) = r(t)/(N-|t|)
xcorr(..., 'unbiased')
public static MapFunction<float[]> createAbsFunction()
public static MapFunction<float[]> createSquareFunction()
public static MapFunction<float[]> createEuclideanNormalization()
public static MapFunction<float[]> createDivByMaxNormalization()
public static MapFunction<float[]> createShortToOneNormalization()
Short.MAX_VALUE
+1 in
order to map them to a range of -1 to 1.public static MapFunction<float[]> createReverseFunction()
public static MapFunction<float[]> createWrapFunction(int length)
length
- lengthpublic static MapFunction<float[]> createInterpolateFunction(float shift, int indicesPerOneShift)
shift
- shift amount between -1 and 1indicesPerOneShift
- number of indices the values need to be shifted, when the (normalized) shift is 1.public static StatefulMapFunction<Float> createTemporalCentroidFunction()
Mapping
.public static StatefulMapFunction<Float> createVarianceFunction()
Mapping
.public static StatefulMapFunction<Float> createStandardDeviationFunction()
Mapping
.public static StatefulMapFunction<Float> createArithmeticMeanFunction()
Mapping
.public static StatefulMapFunction<Float> createFractionFunction(float threshold)
threshold
- threshold (excl.)Copyright © 2011–2020 tagtraum industries incorporated. All rights reserved.