All Packages Class Hierarchy This Package Previous Next Index
Class JSci.maths.EngineerMath
java.lang.Object
|
+----JSci.maths.AbstractMath
|
+----JSci.maths.EngineerMath
- public final class EngineerMath
- extends AbstractMath
This class is dedicated to engineering methods applied to arrays including
signal processing.
All methods here are safe, that is, they create copies of arrays whenever
necessary. This makes for slower methods, but the programmer can always
define his own methods optimized for performance.
-
entropy(double[])
- Compute the entropy of an array.
-
entropy(int[])
- Compute the entropy of an array.
-
icf(double[])
- Shannon entropy of an array.
-
resample(double[], int)
- Set an array to the specified length resampling
using linear interpolation.
-
runningAverage(double[], int)
- Return a running average over the
data.
-
runningMedian(double[], int)
- Return a running median over the
data.
runningAverage
public static double[] runningAverage(double v[],
int width)
- Return a running average over the
data. The returned array has the
same size has the input array.
It is often used in signal processing
to estimate the baseline.
- Parameters:
- v - the data
- width - width of the average
- Throws: IllegalArgumentException
- if v.length < width
- Throws: IllegalArgumentException
- if width is even
- Throws: IllegalArgumentException
- if v.length = 0
runningMedian
public static double[] runningMedian(double v[],
int width)
- Return a running median over the
data. The returned array has the
same size has the input array.
It is often used in signal processing
to estimate the baseline.
Safer than the running average, but
somewhat more costly computationally.
- Parameters:
- v - the data
- width - width of the average
- Throws: IllegalArgumentException
- if v.length < width
- Throws: IllegalArgumentException
- if width is even
icf
public static double icf(double v[])
- Shannon entropy of an array. Please
check that the mass of the array is
one before using this method. Use
the method "entropy" otherwise.
entropy
public static double entropy(double v[])
- Compute the entropy of an array. The
entropy as defined using the absolute
value.
entropy
public static double entropy(int v[])
- Compute the entropy of an array. The
entropy as defined using the absolute
value.
resample
public static double[] resample(double data[],
int newl)
- Set an array to the specified length resampling
using linear interpolation.
All Packages Class Hierarchy This Package Previous Next Index