R
- the real array type.C
- the complex array type.public abstract class AbstractRealArray<R extends AbstractRealArray<R,C>,C extends AbstractComplexArray<C,R>> extends AbstractArray<R,C,R,Double>
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractRealArray.RealMap
Defines an elementwise "map" operation over real-valued multidimensional arrays.
|
static interface |
AbstractRealArray.RealReduce
Defines an elementwise "reduce" operation over real-valued multidimensional arrays.
|
Array.IndexingOrder
INVALID_PARITY, parity
dims, order, strides, values
Modifier | Constructor and Description |
---|---|
protected |
AbstractRealArray(double[] values,
Array.IndexingOrder order,
int[] dims,
int[] strides)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
aEnt()
Computes the entropy over the elements.
|
double |
aMax()
Computes the maximum over the elements.
|
double |
aMean()
Computes the mean over the elements.
|
double |
aMin()
Computes the minimum over the elements.
|
protected R |
applyKernelElementwiseOperation(R b,
int type)
Supports the e* series of operations.
|
protected R |
applyKernelLeftElementwiseOperation(R b,
int type)
Supports the l* series of operations.
|
protected double |
applyKernelRealAccumulatorOperation(int type)
Supports the a* series of operations.
|
protected R |
applyKernelRealDimensionOperation(int type,
int[] opDims)
Supports the d* series of operations.
|
protected IntegerArray |
applyKernelRealIndexOperation(int type,
int dim)
Supports the i* series of operations.
|
protected R |
applyKernelRealReduceOperation(int type,
int[] opDims)
Supports the r* series of operations.
|
protected C |
applyKernelRealToComplexOperation(int type)
Supports the toc* series of operations.
|
protected R |
applyKernelRealUnaryOperation(double a,
int type)
Supports the u* series of operations.
|
double |
aProd()
Computes the product over the elements.
|
double |
aSum()
Computes the sum over the elements.
|
double |
aVar()
Computes the variance over the elements.
|
R |
dProd(int... opDims)
Takes the product along the given dimensions.
|
R |
dSum(int... opDims)
Takes the sum along the given dimensions.
|
R |
eAdd(R array)
Computes the elementwise addition.
|
R |
eDiv(R array)
Computes the elementwise division.
|
R |
eMax(R array)
Computes the elementwise maximum.
|
R |
eMin(R array)
Computes the elementwise minimum.
|
R |
eMul(R array)
Computes the elementwise multiplication.
|
R |
eSub(R array)
Computes the elementwise subtraction.
|
Class<Double> |
getComponentType()
Gets the component type.
|
IntegerArray |
iGZero()
Equates to calling
iGZero(int) with argument -1 . |
IntegerArray |
iGZero(int dim)
Finds all greater-than-zeros along the given dimension.
|
IntegerArray |
iLZero()
Equates to calling
iLZero(int) with argument -1 . |
IntegerArray |
iLZero(int dim)
Finds all less-than-zeros along the given dimension.
|
IntegerArray |
iMax()
Equates to calling
iMax(int) with argument -1 . |
IntegerArray |
iMax(int dim)
Finds the maximum values along the given dimension.
|
IntegerArray |
iMin()
Equates to calling
iMin(int) with argument -1 . |
IntegerArray |
iMin(int dim)
Finds the minimum values along the given dimension.
|
IntegerArray |
iSort()
Equates to calling
iSort(int) with argument -1 . |
IntegerArray |
iSort(int dim)
Sorts along the given dimension.
|
IntegerArray |
iZero()
Equates to calling
iZero(int) with argument -1 . |
IntegerArray |
iZero(int dim)
Finds all zeros along the given dimension.
|
R |
lAdd(R array)
Computes the left elementwise addition.
|
R |
lDiv(R array)
Computes the left elementwise division.
|
R |
lMax(R array)
Computes the left elementwise maximum.
|
R |
lMin(R array)
Computes the left elementwise minimum.
|
R |
lMul(R array)
Computes the left elementwise multiplication.
|
R |
lSub(R array)
Computes the left elementwise subtraction.
|
R |
map(AbstractRealArray.RealMap rm)
Mutatively maps the elements.
|
double |
reduce(AbstractRealArray.RealReduce rr)
Reduces the elements.
|
C |
rfft()
Computes the reduced FFT of this array.
|
int[] |
rfftDimensions()
Gets the reduced FFT dimensions.
|
R |
rMax(int... opDims)
Computes the maximum along the given dimensions.
|
R |
rMean(int... opDims)
Computes the mean along the given dimensions.
|
R |
rMin(int... opDims)
Computes the minimum along the given dimensions.
|
R |
rProd(int... opDims)
Computes the product along the given dimensions.
|
R |
rSum(int... opDims)
Computes the sum along the given dimensions.
|
R |
rVar(int... opDims)
Computes the variance along the given dimensions.
|
C |
tocIm()
Creates an
AbstractComplexArray with the imaginary parts set to this array's elements. |
C |
tocRe()
Creates an
AbstractComplexArray with the real parts set to this array's elements. |
R |
uAbs()
Mutatively takes the absolute value of the elements.
|
R |
uAdd(double a)
Mutatively adds the argument to the elements.
|
R |
uAtan()
Mutatively takes the arctangent of the elements.
|
R |
uCos()
Mutatively takes the cosine of the elements.
|
R |
uExp()
Mutatively exponentiates the elements to the base
Math.E . |
R |
uFill(double a)
Mutatively fills this array with the argument.
|
R |
uInv(double a)
Mutatively takes the multiplicative inverse of the elements.
|
R |
uLog()
Mutatively takes the natural logarithm of the elements.
|
R |
uMul(double a)
Mutatively multiplies the elements by the argument.
|
R |
uPow(double a)
Mutatively takes the elements to the power of the argument.
|
R |
uRnd(double a)
Mutatively randomizes the elements.
|
R |
uShuffle()
Mutatively shuffles this array.
|
R |
uSin()
Mutatively takes the sine of the elements.
|
R |
uSqr()
Mutatively squares the elements.
|
R |
uSqrt()
Mutatively takes the square root of the elements.
|
protected R |
wrap(Double value,
Array.IndexingOrder order,
int[] dims,
int[] strides)
Allocates a new array initialized to the given value.
|
protected R |
wrapDown(int parity,
Array.IndexingOrder order,
int[] dims,
int[] strides)
Creates an instance of the "down" type after a backward FFT.
|
checkInvalidParity, checkMatrixOrder, checkShape, fft, get, ifft, rifft, rifftDimensions, set, toString, transform, wrap, wrap, wrapUp
protected AbstractRealArray(double[] values, Array.IndexingOrder order, int[] dims, int[] strides)
protected R wrap(Double value, Array.IndexingOrder order, int[] dims, int[] strides)
ProtoArray
wrap
in class ProtoArray<R extends AbstractRealArray<R,C>,double[],Double>
value
- the initial value.order
- the storage order.dims
- the dimensions.strides
- the strides.protected R wrapDown(int parity, Array.IndexingOrder order, int[] dims, int[] strides)
AbstractArray
wrapDown
in class AbstractArray<R extends AbstractRealArray<R,C>,C extends AbstractComplexArray<C,R>,R extends AbstractRealArray<R,C>,Double>
public int[] rfftDimensions()
AbstractArray
rfftDimensions
in class AbstractArray<R extends AbstractRealArray<R,C>,C extends AbstractComplexArray<C,R>,R extends AbstractRealArray<R,C>,Double>
public C rfft()
AbstractArray
rfft
in class AbstractArray<R extends AbstractRealArray<R,C>,C extends AbstractComplexArray<C,R>,R extends AbstractRealArray<R,C>,Double>
public Class<Double> getComponentType()
Array
public C tocRe()
AbstractComplexArray
with the real parts set to this array's elements.public C tocIm()
AbstractComplexArray
with the imaginary parts set to this array's elements.public R uCos()
public R uSin()
public R uAtan()
public R uRnd(double a)
public R uLog()
public R uAbs()
public R uPow(double a)
public R uAdd(double a)
public R uMul(double a)
public R uSqrt()
public R uSqr()
public R uInv(double a)
public R uFill(double a)
public R uShuffle()
public double aSum()
public double aProd()
public double aMax()
public double aVar()
public double aEnt()
public double aMin()
public double aMean()
public R rSum(int... opDims)
public R rProd(int... opDims)
public R rMax(int... opDims)
public R rMin(int... opDims)
public R rMean(int... opDims)
public R rVar(int... opDims)
public IntegerArray iMax(int dim)
public IntegerArray iMin(int dim)
public IntegerArray iZero(int dim)
public IntegerArray iGZero(int dim)
public IntegerArray iLZero(int dim)
public IntegerArray iSort(int dim)
public IntegerArray iMax()
iMax(int)
with argument -1
.public IntegerArray iMin()
iMin(int)
with argument -1
.public IntegerArray iZero()
iZero(int)
with argument -1
.public IntegerArray iGZero()
iGZero(int)
with argument -1
.public IntegerArray iLZero()
iLZero(int)
with argument -1
.public IntegerArray iSort()
iSort(int)
with argument -1
.public R dSum(int... opDims)
public R dProd(int... opDims)
protected double applyKernelRealAccumulatorOperation(int type)
protected R applyKernelElementwiseOperation(R b, int type)
protected R applyKernelLeftElementwiseOperation(R b, int type)
protected C applyKernelRealToComplexOperation(int type)
protected R applyKernelRealUnaryOperation(double a, int type)
protected R applyKernelRealReduceOperation(int type, int[] opDims)
protected IntegerArray applyKernelRealIndexOperation(int type, int dim)
protected R applyKernelRealDimensionOperation(int type, int[] opDims)
public R map(AbstractRealArray.RealMap rm)
rm
- the AbstractRealArray.RealMap
.public double reduce(AbstractRealArray.RealReduce rr)
rr
- the AbstractRealArray.RealReduce
.