|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmath.Mat1
public abstract class Mat1
Mat1 is a class that uses 1-D arrays and contains static methods.
Constructor Summary | |
---|---|
Mat1()
|
Method Summary | |
---|---|
static double[] |
accumulate(double[] a)
|
static double |
add(byte[] a)
|
static double |
add(double[] a)
Sum all the numbers and return the result. |
static void |
add(double[] a,
double k)
|
static void |
add(double[] a,
double[] b)
Add two vectors. |
static void |
add(double[] a,
double[] b,
double c)
Add a vector times a scalar to a vector. |
static void |
add(double[] a,
double[] b,
double[] c)
Add three vectors. |
static double |
add(float[] a)
|
static void |
add(float[] a,
float[] b)
Add two vectors. |
static void |
add(float[] a,
float[] b,
float[] c)
|
static double |
add(int[] a)
|
static double |
add(short[] a)
|
static double |
add16(float[] a)
|
static float |
add4(float[] a)
|
static float |
add8(float[] a)
|
static void |
add8(float[] a,
float[] b,
float[] c)
|
static double |
add8Depend(float[] a)
|
static double |
add8NoDepend(float[] a)
|
static double |
addUnsigned(byte[] a)
|
static double[] |
arrayCopy(double[] in)
|
static double[] |
arrayCopy(double[] source,
int sourceStartPoint,
int length)
|
static float[] |
arrayCopy(float[] in)
|
static double[] |
backwardDerivativeMag(double[] a)
|
static void |
centering(double[] r)
|
static int[] |
clamp(int[] ia)
|
static double |
coefficientOfVariation(float[] a)
|
static double |
coefficientOfVariation(int[] a)
Standard deviation divided by the mean is the coefficientOfVariation |
static double[] |
concatenate(double[] a,
double[] b)
|
static double[] |
concatenate(double[] a,
double[] b,
double[] c)
|
static double[] |
concatenate(double[] a,
double[] b,
double[] c,
double[] d)
|
static int[] |
concatenate(int[] a,
int[] b)
|
static double[] |
concatenate(java.util.Vector v)
|
static double[] |
copyArray(double[] a)
|
static float[] |
copyArray(float[] a)
|
static short[] |
copyArray(short[] a)
|
static double[] |
cross2D(double[] a,
double b)
Calculate the cross product of a vector within a plane and a vector perpendicular to a plane. |
static double |
cross2D(double[] a,
double[] b)
Calculate the cross product of two vectors that lie within a plane. |
static double[] |
divide(double[] a,
double b)
Divide creates a new array. |
static double[] |
divide(double[] a,
double[] b)
|
static void |
divideEquals(double[] a,
double b)
Replace the a array with a = a / b |
static double |
dot(double[] a)
Calculate the dot product of a vector with itself. |
static double |
dot(double[] a,
double[] b)
Calculate the dot product of two vectors. |
static short |
dot(short[] a,
short[] b)
Calculate the dot product of two vectors. |
static boolean |
equals(boolean[] a1,
boolean[] a2)
|
static boolean |
equals(byte[] a1,
byte[] a2)
|
static boolean |
equals(char[] a1,
char[] a2)
|
static boolean |
equals(double[] a1,
double[] a2)
|
static boolean |
equals(float[] a1,
float[] a2)
|
static boolean |
equals(int[] a1,
int[] a2)
|
static boolean |
equals(long[] a1,
long[] a2)
|
static boolean |
equals(short[] a1,
short[] a2)
|
static double[] |
fastCorrelation(double[] x,
double[] y,
boolean nomalize)
|
static void |
forwardDerivativeMag(double[] a)
|
static float[] |
getBiasedRampDataFloat(int n)
|
static double[] |
getDouble(float[] d)
|
static double[] |
getDoubleArray(int[] ints)
|
static float[] |
getFloat(double[] d)
|
static double |
getGeometricMean(double[] a)
|
static double |
getGeometricMean(short[] a)
|
static double[] |
getHalfArray(double[] a)
Get 1/2 of the array |
static int[] |
getIntArray(double[] d)
input an array of double and return an array of int, via truncation |
static double[] |
getInterpolation(double[] d,
int ws)
|
static double[] |
getInterpolationMinMax(double[] d,
int ws)
|
static int |
getLocation(double[] a,
double value)
|
static int[] |
getMat1(int i)
|
static int[] |
getMat1(long i)
|
static double |
getMax(double[] a)
|
static float |
getMax(float[] a)
|
static int |
getMax(int[] a)
|
static short |
getMax(short[] a)
|
static int |
getMaxLocation(double[] psd)
|
static int |
getMaxLocation(int offsetFromEdge,
double[] psd)
|
static double |
getMaxValue(double[] in)
|
static double |
getMean(double[] values)
Computes the mean value for the argument array. |
static double[] |
getMean(double[] a,
double[] b,
double[] c)
|
static double |
getMean(double[] values,
int offset,
int number)
Computes the mean value for some elements of the argument array. |
static double |
getMean(float[] a)
Compute the average. |
static double |
getMean(int[] a)
|
static double[] |
getMean(int[] a,
int[] b,
int[] c)
|
static double |
getMean(int[] values,
int offset,
int number)
|
static double |
getMean(short[] a)
Compute the average. |
static double |
getMeanPower(double[] data)
Take the sum of the abs value of the data, then divide by the number of sample points |
static double |
getMeanPower(int windowStartPoint,
int proposedWindowSize,
double[] data)
Compute the mean power in a window. |
static int |
getMedian(int[] a)
|
static int |
getMiddle(int[] a)
|
static double |
getMin(double[] a)
|
static float |
getMin(float[] a)
|
static short |
getMin(short[] a)
|
static int |
getMinLocation(double[] psd)
|
static double[] |
getNormalized(double[] in)
|
static void |
getNormalizedMinus1ToPlus1(double[] d)
Normalized data from -1 to +1 |
static java.util.Vector |
getOverlappedWindows(double[] data,
int ws)
return a vector of arrays, each array is only 256 elements long, each array overlaps by 50% with each other array. |
static double |
getPower(double[] d)
|
static double[] |
getRampData(int n)
Generate an array of doubles that is n elements
long and has numbers that range from 0 to n-1. |
static float[] |
getRampDataFloat(int n)
|
static double[] |
getRandomDoubleData(int n)
|
static float[] |
getRandomFloatData(int n)
|
static double |
getSnrdB(double[] signal,
double[] reconstructedSignal)
|
static double |
getSnrdB(float[] signal,
float[] reconstructedSignal)
|
static double |
getStandardDeviation(double[] values)
Computes the standard deviation for the argument array of values. |
static double |
getStandardDeviation(double[] values,
double mean)
Computes the standard deviation for the argument array of values. |
static double |
getStandardDeviation(double[] values,
int offset,
int number)
Computes the standard deviation for some of the argument array's values. |
static double |
getStandardDeviation(double[] values,
int offset,
int number,
double mean)
Computes the standard deviation for some of the argument array's values. |
static double |
getStandardDeviation(int[] values)
|
static double |
getStandardDeviation(int[] values,
int offset,
int number)
|
static double |
getStandardDeviation(int[] values,
int offset,
int number,
double mean)
|
static double[] |
getSubArray(double[] d,
int startPoint,
int n)
Get a sub-array that starts at the startPoint and takesn the next n data points and returns it in a smaller array |
static double |
getVariance(double[] values)
Computes the variance for the argument array. |
static double |
getVariance(double[] values,
double mean)
Computes the variance for some of the argument array's values. |
static double |
getVariance(double[] values,
int offset,
int number)
Computes the variance for some of the argument array's values. |
static double |
getVariance(double[] values,
int offset,
int number,
double mean)
Computes the variance for some of the argument array's values. |
static double |
getVariance(int[] a)
|
static double |
getVariance(int[] values,
int offset,
int number,
double mean)
|
static java.util.Vector |
getWindows(double[] data,
int ws)
|
static double[] |
histToProbability(int[] dayCounter)
Takes a series of discrete events and computes the probability |
static double[] |
interpolate(double[] c)
|
static void |
interpolate(java.util.Vector v)
|
static void |
intQuickSort(int[] a)
|
static void |
intQuickSort(int[] a,
int lo0,
int hi0)
|
static int |
locateMax(double[] inputData)
Search through the given array and locate the maximum quantity. |
static int |
locateMin(double[] inputData)
Search through the given array and locate the minimum quantity. |
static void |
logArray(double[] a)
|
static void |
lpf(double[] a)
|
static double |
magnitude(double[] a)
Calculate the magnitude a vector. |
static void |
main(java.lang.String[] args)
|
static void |
makeBartlett()
|
static double[] |
makeBartlett(int n)
|
static void |
makeHanning()
|
static double[] |
makeHanning(int n)
|
static void |
makeLyon()
|
static double[] |
makeLyon(int n)
|
static double |
mean(double[] a)
|
static double |
mean(float[] a)
|
static double |
mean(int[] a)
|
static void |
medianFilter(int[] a,
double percentageAboveMedianForClip)
Change the input array so that any value larger than twice as big at the median is replaced with the median. |
static void |
mult(double[] sma,
double v)
Multiply every element in sma by v and replace with new result |
static void |
mult(float[] sma,
float v)
|
static double[] |
multiply(double[] a,
double b)
|
static double[] |
multiply(double[] a,
double[] b)
|
static void |
normalize(double[] a)
Sum all the elements in an array, then divide by the total. |
static void |
normalize(float[] a)
|
static float[] |
normalize(short[] a)
|
static void |
normalizeToMagnitudeOne(double[] a)
|
static int |
numberOfNonZeros(short[][] k)
|
static boolean |
outlierHere(int[] a)
|
static boolean |
outlierHere(int[] a,
double sensitivity)
|
static double[] |
padToIntegralPowerOfTwo(double[] data)
|
static void |
plus(double[] a,
double[] b)
Add two vectors. |
static void |
plus(double[] a,
double[] b,
double c)
Add a vector times a scalar to a vector. |
static void |
print(double[] a)
|
static void |
print(double[] v,
java.lang.String title)
|
static void |
print(float[] a)
|
static void |
print(int[] a)
|
static void |
print(java.lang.Object[] o)
|
static void |
printStats(float[] a)
|
static void |
printStats(java.lang.String title,
float[] a)
|
static void |
quickSort(int[] a)
|
static void |
quickSort(int[] a,
int lo0,
int hi0)
|
static float[] |
ramp(float start,
float end,
int n)
|
static int[] |
removeDuplicates(int[] locations)
|
static void |
removeTheDcComponent(float[] m)
|
static double[] |
resampleAdaptive(double[] d)
|
static void |
reverse(double[] doubles)
Alter the input array so that it is reversed in place |
static void |
scale(double[] a,
double k)
|
static void |
scale(float[] a,
double k)
|
static void |
scale(float[] a,
float k)
|
static float[] |
scale(short[] a,
float k)
|
static void |
scaleIntoRange(float[] im,
float min,
float max,
int maxValueOutput)
|
static double[] |
shift(double[] d,
int s)
|
static float[] |
shortToFloat(short[] a)
|
static double[] |
slowCorrelationNormalized(double[] x,
double[] y)
|
static double[] |
slowCorrelationNotNormalized(double[] x,
double[] y)
|
static double[] |
sort(double[] a)
|
static int[] |
sort(int[] a)
Ascending sort of int array |
static double[] |
sortDescending(double[] a)
|
static double[] |
subtract(double[] a,
double b)
|
static double[] |
subtract(double[] a,
double[] b)
|
static double |
sumOfSquares(double[] d)
|
static double |
sumOfTheSquares(double[] x)
|
static float |
sumV(float[] a)
|
static void |
swap(int[] x,
int a,
int b)
|
static void |
synthesizeRamp(float[] realPart,
float[] imaginaryPart)
Destroy the input data with a linear ramp. |
static void |
testAdd1()
|
static void |
testAdd1(float[] a)
Show how loop unwinding can improve speed for a vector sum, but only to a point. |
static void |
testAdd2()
|
static void |
testAddFloat()
|
static void |
testCoefficientOfVariation()
|
static void |
testConcatenate()
|
static void |
testCorrelate()
|
static void |
testGeometricMean()
|
static void |
testGetMedian()
|
static void |
testGetOverlappedWindows()
|
static void |
testGetRandomFloatData()
|
static void |
testGetWindows()
|
static void |
testHanningOverlappedWindows()
|
static void |
testHanningOverlappedWindowsSpectrogram()
|
static void |
testInterpolation()
|
static void |
testOutlier()
|
static void |
testPadOutWithZeros()
|
static void |
testPadToIntegralPowerOfTwo()
|
static void |
testQuickSort()
|
static void |
testShift()
|
static void |
testtruncateToIntegralPowerOfTwo()
|
static void |
testVariance()
|
static void |
threshold(short[] a)
|
static void |
threshold(short[] a,
short thresh)
For each element in a below the thresh ,
make the element 0, otherwise make the element 255. |
static double[] |
truncateToIntegralPowerOfTwo(double[] data)
|
static java.lang.String[] |
truncateToIntegralPowerOfTwo(java.lang.String[] data)
|
static double |
variance(float[] a)
|
static double |
variance(int[] a)
|
static void |
window(double[] inputData,
double[] window)
Replaces the inputData with amplitude modulated data that takes its multiplying factors from the window. |
static void |
windowArray(double[] window,
double[] r_d)
|
static void |
windowArrays(double[] window,
double[] r_d,
double[] i_d)
This will apply the windows to each of the arrays. |
static double |
y5(double y0,
double y1,
double u)
This is a quintic with zero curvature and slope at the end points. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Mat1()
Method Detail |
---|
public static void testInterpolation()
public static void testGetWindows()
public static double[] getInterpolationMinMax(double[] d, int ws)
public static double[] getInterpolation(double[] d, int ws)
public static double[] concatenate(java.util.Vector v)
public static void interpolate(java.util.Vector v)
public static double[] interpolate(double[] c)
public static java.util.Vector getWindows(double[] data, int ws)
public static double[] concatenate(double[] a, double[] b, double[] c)
public static double[] concatenate(double[] a, double[] b, double[] c, double[] d)
public static double[] concatenate(double[] a, double[] b)
public static int[] concatenate(int[] a, int[] b)
public static void testConcatenate()
public static double[] resampleAdaptive(double[] d)
public static void medianFilter(int[] a, double percentageAboveMedianForClip)
a
- public static void testCorrelate()
public static void add(double[] a, double[] b, double c)
a
- the first vectorb
- the second vectorc
- the scalar multiplierpublic static void add(double[] a, double[] b)
a
- the first vector a = a + b;
b
- the second vectorpublic static void add(double[] a, double[] b, double[] c)
a
- the first vector a = a + b;
b
- the second vectorc
- the second vectorpublic static void add(float[] a, float[] b)
a
- the first vector a = a + b;b
- the second vectorpublic static void testAddFloat()
public static void testAdd2()
public static double dot(double[] a, double[] b)
a
- the first vectorb
- the second vector
public static short dot(short[] a, short[] b)
a
- the first vectorb
- the second vector
public static double dot(double[] a)
a
- the vector
public static double magnitude(double[] a)
a
- the vector
public static void print(int[] a)
public static void print(double[] a)
public static void printStats(java.lang.String title, float[] a)
public static void printStats(float[] a)
public static void print(float[] a)
public static double add(double[] a)
a
- the numbers to be added
public static void lpf(double[] a)
public static double[] backwardDerivativeMag(double[] a)
public static void forwardDerivativeMag(double[] a)
public static float[] ramp(float start, float end, int n)
public static void testAdd1()
public static void testAdd1(float[] a)
public static void add(float[] a, float[] b, float[] c)
public static void add8(float[] a, float[] b, float[] c)
public static float add4(float[] a)
public static float add8(float[] a)
public static double add8Depend(float[] a)
public static double add8NoDepend(float[] a)
public static void reverse(double[] doubles)
doubles
- both the input and outputpublic static double add16(float[] a)
public static double add(float[] a)
public static double add(short[] a)
public static double add(int[] a)
public static double add(byte[] a)
public static double addUnsigned(byte[] a)
public static float sumV(float[] a)
public static void normalize(double[] a)
a
- public static void normalizeToMagnitudeOne(double[] a)
public static float[] normalize(short[] a)
public static void normalize(float[] a)
public static double getMean(float[] a)
a
- array of numbers to be averaged
public static double getMean(short[] a)
a
- array of shorts
public static void threshold(short[] a, short thresh)
thresh
,
make the element 0, otherwise make the element 255.
a
- an array whose values are altered.thresh
- a point that is used to floor or ceiling apublic static void threshold(short[] a)
public static float[] scale(short[] a, float k)
public static void scale(double[] a, double k)
public static void add(double[] a, double k)
public static void scale(float[] a, float k)
public static void scale(float[] a, double k)
public static float[] shortToFloat(short[] a)
public static short[] copyArray(short[] a)
public static double[] copyArray(double[] a)
public static float[] copyArray(float[] a)
public static double variance(int[] a)
public static double variance(float[] a)
public static double mean(int[] a)
public static double mean(double[] a)
public static double mean(float[] a)
public static double coefficientOfVariation(int[] a)
a
- list of numbers
public static double coefficientOfVariation(float[] a)
public static void testVariance()
public static void testCoefficientOfVariation()
public static boolean outlierHere(int[] a)
public static boolean outlierHere(int[] a, double sensitivity)
public static void testOutlier()
public static void quickSort(int[] a, int lo0, int hi0)
public static void swap(int[] x, int a, int b)
public static void quickSort(int[] a)
public static double[] getMean(double[] a, double[] b, double[] c)
public static double[] getMean(int[] a, int[] b, int[] c)
public static double getMin(double[] a)
public static float getMin(float[] a)
public static short getMin(short[] a)
public static int getMax(int[] a)
public static short getMax(short[] a)
public static double getMax(double[] a)
public static float getMax(float[] a)
public static void testQuickSort()
public static int numberOfNonZeros(short[][] k)
public static float[] arrayCopy(float[] in)
public static double[] arrayCopy(double[] in)
public static double[] getRampData(int n)
n
elements
long and has numbers that range from 0 to n-1.
For example:
double x1[] = getRampData(N);>
n
- a positive integer
public static float[] getRampDataFloat(int n)
public static void testGetRandomFloatData()
public static float[] getRandomFloatData(int n)
public static double[] getRandomDoubleData(int n)
public static float[] getBiasedRampDataFloat(int n)
public static double getMaxValue(double[] in)
public static void print(double[] v, java.lang.String title)
public static void window(double[] inputData, double[] window)
inputData
- the data to be windowswindow
- the windowpublic static double[] getSubArray(double[] d, int startPoint, int n)
d
- input datastartPoint
- n
-
public static void print(java.lang.Object[] o)
public static void synthesizeRamp(float[] realPart, float[] imaginaryPart)
realPart
- input datas real componentimaginaryPart
- input datas' imaginary component.public static double getMean(double[] values)
values
- double array on which the mean is to be determined
java.lang.IllegalArgumentException
- if the array has not affineTransform least one elementpublic static double getMean(double[] values, int offset, int number)
values
- array from which elements are readoffset
- index of the first element to be usednumber
- number of elements to be used
java.lang.IllegalArgumentException
- if the array has not affineTransform least one elementpublic static double getMean(int[] values, int offset, int number)
public static double getStandardDeviation(double[] values)
values
- array from which elements are read
java.lang.IllegalArgumentException
- if the array has not affineTransform least two elementspublic static double getStandardDeviation(int[] values)
public static double getStandardDeviation(double[] values, double mean)
values
- array from which elements are readmean
- the mean value for the array, possibly computed with a
call to getMean(double[])
.
java.lang.IllegalArgumentException
- if the array has not affineTransform least two elementspublic static double getStandardDeviation(double[] values, int offset, int number)
getMean(double[],int,int)
,
better call getStandardDeviation(double[],int,int,double)
.
Otherwise, this method has to compute mean again.
values
- array from which elements are readoffset
- first element to be usednumber
- number of elements used starting affineTransform values[offset]
java.lang.IllegalArgumentException
- if the array has not affineTransform least two elementspublic static double getStandardDeviation(int[] values, int offset, int number)
public static double getStandardDeviation(double[] values, int offset, int number, double mean)
values
- array from which elements are readoffset
- first element to be usednumber
- number of elements used starting affineTransform values[offset]mean
- value of the elements
java.lang.IllegalArgumentException
- if the array has not affineTransform least two elementspublic static double getStandardDeviation(int[] values, int offset, int number, double mean)
public static double getVariance(double[] values)
values
- array from which elements are read
java.lang.IllegalArgumentException
- if the array has not affineTransform least two elementspublic static double getVariance(double[] values, double mean)
values
- array from which elements are readmean
- the mean for the array elements
java.lang.IllegalArgumentException
- if the array has not affineTransform least two elementspublic static double getVariance(double[] values, int offset, int number)
getMean(double[],int,int)
,
better call getVariance(double[],int,int,double)
.
Otherwise, this method has to compute mean again.
values
- array from which elements are readoffset
- first element to be usednumber
- number of elements used starting affineTransform values[offset]
java.lang.IllegalArgumentException
- if the array has not affineTransform least two elementspublic static double getVariance(double[] values, int offset, int number, double mean)
values
- array from which elements are readoffset
- first element to be usednumber
- number of elements used starting affineTransform values[offset]mean
- the mean for the array elements
java.lang.IllegalArgumentException
- if the array has not affineTransform least two elementspublic static double getVariance(int[] values, int offset, int number, double mean)
public static void removeTheDcComponent(float[] m)
public static void scaleIntoRange(float[] im, float min, float max, int maxValueOutput)
public static double getMean(int[] a)
public static void testGeometricMean()
public static double getGeometricMean(short[] a)
public static double getGeometricMean(double[] a)
public static double getVariance(int[] a)
public static void intQuickSort(int[] a)
public static void testGetMedian()
public static int getMedian(int[] a)
public static int getMiddle(int[] a)
public static void testPadOutWithZeros()
public static double[] makeHanning(int n)
public static double[] makeLyon(int n)
public static void logArray(double[] a)
public static void testHanningOverlappedWindowsSpectrogram()
public static void testHanningOverlappedWindows()
public static void testGetOverlappedWindows()
public static void makeBartlett()
public static void makeHanning()
public static java.util.Vector getOverlappedWindows(double[] data, int ws)
data
-
public static void windowArray(double[] window, double[] r_d)
public static double y5(double y0, double y1, double u)
y0
- start valuey1
- end valueu
- dilation parameter that ranges from 0 to 1.
public static void windowArrays(double[] window, double[] r_d, double[] i_d)
window
- r_d
- i_d
- public static void makeLyon()
public static double[] makeBartlett(int n)
public static int getMinLocation(double[] psd)
public static int getLocation(double[] a, double value)
a
- value
-
public static int getMaxLocation(int offsetFromEdge, double[] psd)
public static int getMaxLocation(double[] psd)
public static double getMeanPower(double[] data)
data
-
public static double getMeanPower(int windowStartPoint, int proposedWindowSize, double[] data)
windowStartPoint
- proposedWindowSize
- data
-
public static double[] arrayCopy(double[] source, int sourceStartPoint, int length)
public static void centering(double[] r)
public static int[] sort(int[] a)
a
-
public static double[] sort(double[] a)
public static double[] sortDescending(double[] a)
public static double[] getHalfArray(double[] a)
a
-
public static boolean equals(float[] a1, float[] a2)
public static boolean equals(double[] a1, double[] a2)
public static boolean equals(short[] a1, short[] a2)
public static boolean equals(long[] a1, long[] a2)
public static boolean equals(byte[] a1, byte[] a2)
public static boolean equals(boolean[] a1, boolean[] a2)
public static boolean equals(char[] a1, char[] a2)
public static boolean equals(int[] a1, int[] a2)
public static int[] clamp(int[] ia)
public static void mult(double[] sma, double v)
sma
- v
- public static void mult(float[] sma, float v)
public static int[] getIntArray(double[] d)
public static double[] getDoubleArray(int[] ints)
public static double[] subtract(double[] a, double[] b)
public static double[] subtract(double[] a, double b)
public static double[] divide(double[] a, double[] b)
public static double[] divide(double[] a, double b)
a
- an input array that is not changed.b
- a scalar that is not changed.
public static void divideEquals(double[] a, double b)
a
- the arg is changedb
- a scalar for division, not zeropublic static double[] multiply(double[] a, double[] b)
public static double[] multiply(double[] a, double b)
public static double[] accumulate(double[] a)
public static double[] getNormalized(double[] in)
public static int locateMin(double[] inputData)
inputData
-
public static int locateMax(double[] inputData)
inputData
-
public static double[] histToProbability(int[] dayCounter)
dayCounter
-
public static double sumOfTheSquares(double[] x)
public static void plus(double[] a, double[] b, double c)
a
- the first vectorb
- the second vectorc
- the scalar multiplierpublic static void plus(double[] a, double[] b)
a
- the first vectorb
- the second vectorpublic static double cross2D(double[] a, double[] b)
a
- the first vectorb
- the second vector
public static double[] cross2D(double[] a, double b)
a
- the vector in the planeb
- the vector perpendicular to the planepublic static void intQuickSort(int[] a, int lo0, int hi0)
public static float[] getFloat(double[] d)
public static double[] getDouble(float[] d)
public static void testPadToIntegralPowerOfTwo()
public static double[] padToIntegralPowerOfTwo(double[] data)
public static double[] truncateToIntegralPowerOfTwo(double[] data)
public static java.lang.String[] truncateToIntegralPowerOfTwo(java.lang.String[] data)
public static void testtruncateToIntegralPowerOfTwo()
public static int[] removeDuplicates(int[] locations)
public static double getPower(double[] d)
public static double[] shift(double[] d, int s)
d
- array to be shifteds
- amount of shift, with zero padding
public static double[] fastCorrelation(double[] x, double[] y, boolean nomalize)
public static double sumOfSquares(double[] d)
public static double[] slowCorrelationNormalized(double[] x, double[] y)
public static double[] slowCorrelationNotNormalized(double[] x, double[] y)
public static int[] getMat1(long i)
i
- convert i into an array of int values 0, 1
public static int[] getMat1(int i)
i
- convert i into an array of int values 0, 1
public static double getSnrdB(double[] signal, double[] reconstructedSignal)
public static double getSnrdB(float[] signal, float[] reconstructedSignal)
public static void testShift()
public static void getNormalizedMinus1ToPlus1(double[] d)
d
- is altered as a side-effect.public static void main(java.lang.String[] args) throws java.io.FileNotFoundException
java.io.FileNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |