|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjfftw.ArrayUtil
public class ArrayUtil
Class containing some useful static method to manipulate double arrays containing complex data used in jfftw.
| Constructor Summary | |
|---|---|
ArrayUtil()
|
|
| Method Summary | |
|---|---|
static void |
conjugate(double[] data)
Method to take form the conjugate of an interleaved array by taking the negative of imaginary parts. |
static void |
conjugate(double[][] split)
Method to take form the conjugate of a split array by taking the negative of imaginary parts. |
static Complex |
getComplex(double[][] split,
int i)
Static method to get the ith Complex element from a split array consisting of real and imaginary parts in a [2][] array |
static Complex |
getComplex(double[] real,
double[] imag,
int i)
Static method to get the ith Complex element from a split array consisting of real and imaginary parts. |
static Complex |
getComplex(double[] data,
int i)
Static method to get the ith Complex element from an interleaved array where real part is in 2*i and imaginary in 2*i + 1. |
static double[] |
interleave(double[][] data)
Static method to take split array normally holding real and imaginary parts and interleave them to a single array. |
static double[] |
interleave(double[] real,
double[] imag)
Static method to take two double arrays normally holding real and imaginary parts and interleave them to a single array. |
static void |
mult(double[][] split,
Complex c)
Method to multiply a split array by a complex. |
static void |
mult(double[][] split,
double a)
Method to multiply a split array by a double. |
static void |
mult(double[][] first,
double[][] second)
Methed to multiply two split arrays puttin the result in the first. |
static void |
mult(double[][] split,
double a,
double b)
Method to multiply a split array by a complex specified as two doubles. |
static void |
mult(double[] data,
Complex c)
Method to multiply an interleaved array by a complex. |
static void |
mult(double[] data,
double a)
Method to multiply an interleaved array by a double. |
static void |
mult(double[] first,
double[] second)
Method to multiply two complex interleaved data arrays placing the result in the first. |
static void |
mult(double[] data,
double a,
double b)
Method to multiply a interleaved array by a complex specified as two doubles. |
static void |
mult(double[] data,
int i,
Complex c)
Multiply specifed element of interleaved array by a complex. |
static void |
mult(double[] data,
int i,
double a)
Multiply specifed element of interleaved array by a double |
static void |
mult(double[] data,
int i,
double a,
double b)
Multiply specifed element of interleaved array by a complex specified as two doubles. |
static void |
multConjugate(double[][] first,
double[][] second)
Methed to multiply first array by complex conjugate of teh second. |
static void |
multConjugate(double[] first,
double[] second)
Method to multiply a interleaves complex arrays with the complex conjugate of an interfeaved array, placing the result in the first. |
static void |
setComplex(double[][] split,
int i,
Complex z)
Static to set the ith component of split array array with a Complex. |
static void |
setComplex(double[][] split,
int i,
double a,
double b)
Static to set the ith component of split array array with a Complex. |
static void |
setComplex(double[] real,
double[] imag,
int i,
Complex z)
Static to set the ith component of split array array with a Complex. |
static void |
setComplex(double[] real,
double[] imag,
int i,
double a,
double b)
Static to set the ith component of split array array with two doubles |
static void |
setComplex(double[] data,
int i,
Complex z)
Static to set the ith component of a interleaved complex array with a Complex. |
static void |
setComplex(double[] data,
int i,
double a,
double b)
Static to set the ith component of a interleaved complex array with a two doubles |
static double[][] |
split(double[] data)
Static method to split an interleaved array into two split array, returned as a double[2][] array with [0][i] and [1][i] holding the real / imaginary parts. |
static double[][] |
split(double[] real,
double[] imag)
Static method to form a split array from a real and imaginary array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayUtil()
| Method Detail |
|---|
public static double[] interleave(double[] real,
double[] imag)
real - the real arrayimag - the imaginary array (can be null, or length zero).
double[] interleaved array.public static double[] interleave(double[][] data)
data - the split array
double[] interleaved array.public static double[][] split(double[] data)
data - the interleaved array.
double[][] of size [2][data.length/2]
public static double[][] split(double[] real,
double[] imag)
Note the data is not copied to new space.
real - the real arrayimag - the imaginary array
double[][] array in split format.
public static Complex getComplex(double[] data,
int i)
data - the interleaved arrayi - the element index
public static void setComplex(double[] data,
int i,
Complex z)
data - the interleaved arrayi - the element indexz - the value
public static void setComplex(double[] data,
int i,
double a,
double b)
data - the interleaved arrayi - the element indexa - the real partb - the imaginary part.
public static Complex getComplex(double[] real,
double[] imag,
int i)
real - the real array.imag - the imaginary array.i - the element index.
public static void setComplex(double[] real,
double[] imag,
int i,
Complex z)
real - the real arrayimag - the imaginary arrayi - the element indexz - the value
public static void setComplex(double[] real,
double[] imag,
int i,
double a,
double b)
real - the real arrayimag - the imaginary arrayi - the element indexa - the real partb - the imainary part
public static Complex getComplex(double[][] split,
int i)
split - the [2][] arrayi - the element index.
public static void setComplex(double[][] split,
int i,
Complex z)
split - the split array of real and imaginary partsi - the element indexz - the value
public static void setComplex(double[][] split,
int i,
double a,
double b)
split - the split array of real and imaginary partsi - the element indexa - the real partb - the imaginary part.
public static void mult(double[] data,
int i,
double a)
data - the interleaved arrayi - the indexa - the double.
public static void mult(double[] data,
int i,
double a,
double b)
data - the interleaved arrayi - the indexa - real partb - imaginary part
public static void mult(double[] data,
int i,
Complex c)
data - the interleaved arrayi - the indexc - the Complex
public static void mult(double[] data,
double a)
data - the interleaved arraya - the multiplier.
public static void mult(double[][] split,
double a)
split - the split arraya - the multiplier.
public static void mult(double[] data,
double a,
double b)
data - the interleaved arraya - real part of multiplierb - imaginary part of multiplier
public static void mult(double[] data,
Complex c)
data - the interleaved arrayc - the Complex multiplier
public static void mult(double[][] split,
double a,
double b)
split - the split arraya - real part of multiplierb - imaginary part of multiplier
ArrayIndexOutOfBoundsException - if
real and imaginary arrays of different lengths.
public static void mult(double[][] split,
Complex c)
split - the split arrayc - the Complex multiplier
public static void mult(double[] first,
double[] second)
first - the first interleaved arraysecond - the second interleaved array (not changed)
ArrayIndexOutOfBoundsException - if
the two arrays are not the same length.
public static void multConjugate(double[] first,
double[] second)
first - the first interleaved arraysecond - the second interleaved array (not changed)
ArrayIndexOutOfBoundsException - if
the two arrays are not the same length.
public static void mult(double[][] first,
double[][] second)
first - the first split arraysecond - the second split array.
ArrayIndexOutOfBoundsException - if
the two arrays are not the same length.
public static void multConjugate(double[][] first,
double[][] second)
first - the first split arraysecond - the second split array.
ArrayIndexOutOfBoundsException - if
the two arrays are not the same length.public static void conjugate(double[] data)
data - the interleaved array.public static void conjugate(double[][] split)
split - the split array.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||