T
- the base parameterization.U
- the "up" parameterization representing the forward FFT type.D
- the "down" parameterization representing the backward FFT type.E
- the array element type.public abstract class AbstractArray<T extends AbstractArray<T,U,D,E>,U extends AbstractArray<? extends U,?,?,?>,D extends AbstractArray<? extends D,?,?,?>,E> extends ProtoArray<T,double[],E>
Array.IndexingOrder
Modifier and Type | Field and Description |
---|---|
protected static int |
INVALID_PARITY
|
protected int |
parity
An extra bit of information to help
rifft() correctly size destination arrays. |
dims, order, strides, values
Modifier | Constructor and Description |
---|---|
protected |
AbstractArray(double[] values,
int parity,
Array.IndexingOrder order,
int[] dims,
int[] strides)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkInvalidParity()
Checks that this array's parity is
INVALID_PARITY . |
protected void |
checkMatrixOrder()
Checks that this array has storage order
ArrayBase.DEFAULT_ORDER . |
protected int |
checkShape(T b)
Checks that two
AbstractArray s have the same size and underlying Array.IndexingOrder . |
protected T |
fft()
Computes the full FFT of this array.
|
double |
get(int... s)
Gets the value at the given logical index.
|
protected T |
ifft()
Computes the full IFFT of this array.
|
protected U |
rfft()
Computes the reduced FFT of this array.
|
protected int[] |
rfftDimensions()
Gets the reduced FFT dimensions.
|
protected D |
rifft()
Computes the reduced IFFT of this array.
|
protected int[] |
rifftDimensions()
Gets the reduced IFFT dimensions.
|
void |
set(double value,
int... s)
Sets the value at the given logical index.
|
String |
toString()
Creates a human-readable representation of this array.
|
protected T |
transform(int direction)
Transforms this array in the forward/backward FFT direction.
|
protected T |
wrap(Array.IndexingOrder order,
int[] dims,
int[] strides)
Allocates a new array.
|
protected abstract T |
wrap(int parity,
Array.IndexingOrder order,
int[] dims,
int[] strides)
Creates an instance of the base type.
|
protected abstract D |
wrapDown(int parity,
Array.IndexingOrder order,
int[] dims,
int[] strides)
Creates an instance of the "down" type after a backward FFT.
|
protected abstract U |
wrapUp(int parity,
Array.IndexingOrder order,
int[] dims,
int[] strides)
Creates an instance of the "up" type after a forward FFT.
|
clone, concat, dims, getBytes, map, nDims, order, physical, reshape, reverse, reverseOrder, shift, size, slice, slice, slice, slice, splice, stride, strides, subarray, tile, transpose, values, wrap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentType
protected final int parity
rifft()
correctly size destination arrays.protected static final int INVALID_PARITY
protected AbstractArray(double[] values, int parity, Array.IndexingOrder order, int[] dims, int[] strides)
protected abstract T wrap(int parity, Array.IndexingOrder order, int[] dims, int[] strides)
protected abstract U wrapUp(int parity, Array.IndexingOrder order, int[] dims, int[] strides)
protected abstract D wrapDown(int parity, Array.IndexingOrder order, int[] dims, int[] strides)
public double get(int... s)
public void set(double value, int... s)
protected T wrap(Array.IndexingOrder order, int[] dims, int[] strides)
ProtoArray
wrap
in class ProtoArray<T extends AbstractArray<T,U,D,E>,double[],E>
order
- the storage order.dims
- the dimensions.strides
- the strides.public String toString()
Array
protected U rfft()
protected D rifft()
protected T fft()
protected T ifft()
protected int[] rfftDimensions()
protected int[] rifftDimensions()
protected void checkMatrixOrder()
ArrayBase.DEFAULT_ORDER
.protected void checkInvalidParity()
INVALID_PARITY
.protected int checkShape(T b)
AbstractArray
s have the same size and underlying Array.IndexingOrder
.b
- the AbstractArray
to compare to.parity
value.protected T transform(int direction)
direction
- the FFT direction.