public class IntegerArray extends ProtoArray<IntegerArray,int[],Integer>
Array.IndexingOrder
dims, order, strides, values
Modifier | Constructor and Description |
---|---|
|
IntegerArray(Array.IndexingOrder order,
int... dims)
Default constructor.
|
protected |
IntegerArray(Array.IndexingOrder order,
int[] dims,
int[] strides)
Internal constructor for package use only.
|
|
IntegerArray(int[] values,
Array.IndexingOrder order,
int... dims)
Alternate constructor.
|
|
IntegerArray(int[] values,
int... dims)
Alternate constructor.
|
protected |
IntegerArray(int unused,
Array.IndexingOrder order,
int[] dims)
Internal constructor with a distinctive signature.
|
|
IntegerArray(IntegerArray array)
Alternate constructor.
|
protected |
IntegerArray(int unused,
int[] values,
Array.IndexingOrder order,
int[] dims)
Internal constructor with a distinctive signature.
|
Modifier and Type | Method and Description |
---|---|
protected IntegerArray |
applyKernelElementwiseOperation(IntegerArray b,
int type)
Supports the e* series of operations.
|
protected IntegerArray |
applyKernelIntegerUnaryOperation(int a,
int type)
Supports the u* series of operations.
|
protected IntegerArray |
applyKernelLeftElementwiseOperation(IntegerArray b,
int type)
Supports the l* series of operations.
|
protected void |
checkShape(IntegerArray b)
Checks that two
IntegerArray s have the same size and underlying Array.IndexingOrder . |
IntegerArray |
eAdd(IntegerArray array)
Computes the elementwise addition.
|
IntegerArray |
eMax(IntegerArray array)
Computes the elementwise maximum.
|
IntegerArray |
eMin(IntegerArray array)
Computes the elementwise minimum.
|
IntegerArray |
eMul(IntegerArray array)
Computes the elementwise multiplication.
|
IntegerArray |
eSub(IntegerArray array)
Computes the elementwise subtraction.
|
int[] |
find(int... s)
Assumes that this array results from an indexing operation.
|
int |
get(int... s)
Gets the value at the given logical index.
|
byte[] |
getBytes()
Converts this array into
byte s. |
Class<Integer> |
getComponentType()
Gets the component type.
|
IntegerArray |
lAdd(IntegerArray array)
Computes the left elementwise addition.
|
IntegerArray |
lMax(IntegerArray array)
Computes the left elementwise maximum.
|
IntegerArray |
lMin(IntegerArray array)
Computes the left elementwise minimum.
|
IntegerArray |
lMul(IntegerArray array)
Computes the left elementwise multiplication.
|
IntegerArray |
lSub(IntegerArray array)
Computes the left elementwise subtraction.
|
static IntegerArray[] |
ndgrid(int... ranges)
Generates arrays representing integral coordinates along each dimension of a multidimensional function's domain.
|
static IntegerArray |
parse(byte[] data)
Parses an array from
byte s. |
void |
set(int value,
int... s)
Sets the value at the given logical index.
|
int |
singleton()
Gets the singleton value from this array.
|
RealArray |
tor()
Converts this array to a
RealArray . |
String |
toString()
Creates a human-readable representation of this array.
|
IntegerArray |
uAdd(int a)
Mutatively adds the argument to the elements.
|
IntegerArray |
uFill(int a)
Mutatively fills this array with the argument.
|
IntegerArray |
uMul(int a)
Mutatively multiplies the elements by the argument.
|
IntegerArray |
uShuffle()
Mutatively shuffles this array.
|
protected IntegerArray |
wrap(Array.IndexingOrder order,
int[] dims,
int[] strides)
Allocates a new array.
|
protected IntegerArray |
wrap(Integer value,
Array.IndexingOrder order,
int[] dims,
int[] strides)
Allocates a new array initialized to the given value.
|
public IntegerArray(Array.IndexingOrder order, int... dims)
protected IntegerArray(int unused, Array.IndexingOrder order, int[] dims)
public IntegerArray(int[] values, int... dims)
public IntegerArray(int[] values, Array.IndexingOrder order, int... dims)
public IntegerArray(IntegerArray array)
protected IntegerArray(int unused, int[] values, Array.IndexingOrder order, int[] dims)
protected IntegerArray(Array.IndexingOrder order, int[] dims, int[] strides)
protected IntegerArray wrap(Array.IndexingOrder order, int[] dims, int[] strides)
ProtoArray
wrap
in class ProtoArray<IntegerArray,int[],Integer>
order
- the storage order.dims
- the dimensions.strides
- the strides.protected IntegerArray wrap(Integer value, Array.IndexingOrder order, int[] dims, int[] strides)
ProtoArray
wrap
in class ProtoArray<IntegerArray,int[],Integer>
value
- the initial value.order
- the storage order.dims
- the dimensions.strides
- the strides.public int get(int... s)
public void set(int value, int... s)
public byte[] getBytes()
ProtoArray
byte
s.getBytes
in class ProtoArray<IntegerArray,int[],Integer>
byte
s.public Class<Integer> getComponentType()
Array
public String toString()
Array
public int[] find(int... s)
s
- the logical index, where the dimension of interest is marked with a -1
.public int singleton()
public IntegerArray uAdd(int a)
public IntegerArray uMul(int a)
public IntegerArray uFill(int a)
public IntegerArray uShuffle()
public IntegerArray eAdd(IntegerArray array)
public IntegerArray eSub(IntegerArray array)
public IntegerArray eMul(IntegerArray array)
public IntegerArray eMax(IntegerArray array)
public IntegerArray eMin(IntegerArray array)
public IntegerArray lAdd(IntegerArray array)
public IntegerArray lSub(IntegerArray array)
public IntegerArray lMul(IntegerArray array)
public IntegerArray lMax(IntegerArray array)
public IntegerArray lMin(IntegerArray array)
protected IntegerArray applyKernelElementwiseOperation(IntegerArray b, int type)
protected IntegerArray applyKernelLeftElementwiseOperation(IntegerArray b, int type)
protected IntegerArray applyKernelIntegerUnaryOperation(int a, int type)
protected void checkShape(IntegerArray b)
IntegerArray
s have the same size and underlying Array.IndexingOrder
.b
- the IntegerArray
to compare to.public static final IntegerArray parse(byte[] data)
byte
s.public static final IntegerArray[] ndgrid(int... ranges)
ranges
- the range specifications as an array of three-tuples. Given the i
th tuple, the first
component denotes the start value, the second component denotes the end value, and the third component
denotes the step size.n
IntegerArray
s, where n
is the number of dimensions.