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.


Method Index

 o entropy(double[])
Compute the entropy of an array.
 o entropy(int[])
Compute the entropy of an array.
 o icf(double[])
Shannon entropy of an array.
 o resample(double[], int)
Set an array to the specified length resampling using linear interpolation.
 o runningAverage(double[], int)
Return a running average over the data.
 o runningMedian(double[], int)
Return a running median over the data.

Methods

 o 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
 o 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
 o 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.

 o entropy
 public static double entropy(double v[])
Compute the entropy of an array. The entropy as defined using the absolute value.

 o entropy
 public static double entropy(int v[])
Compute the entropy of an array. The entropy as defined using the absolute value.

 o 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