public abstract class BaseSparseNDArray extends Object implements ISparseNDArray
Modifier and Type | Field and Description |
---|---|
protected int |
columns |
protected Boolean |
isMatrix |
protected Boolean |
isScalar |
static boolean |
isSparse |
protected Boolean |
isVector |
protected int[] |
javaShapeInformation |
protected long |
length |
protected int |
rank |
protected int |
rows |
protected DataBuffer |
shape |
protected DataBuffer |
shapeInformation |
protected DataBuffer |
sparseInformation |
protected DataBuffer |
stride |
protected static double |
THRESHOLD_MEMORY_ALLOCATION |
Constructor and Description |
---|
BaseSparseNDArray() |
Modifier and Type | Method and Description |
---|---|
IComplexNDArray |
add(IComplexNumber n) |
IComplexNDArray |
add(IComplexNumber n,
IComplexNDArray result) |
INDArray |
add(INDArray other)
Element-wise copy addition of two NDArrays
|
INDArray |
add(INDArray other,
INDArray result)
Element-wise copy addition of two NDArrays
|
INDArray |
add(Number n)
Scalar addition (cloning)
|
INDArray |
add(Number n,
INDArray result) |
INDArray |
addColumnVector(INDArray columnVector)
Addition of a column vector (copy)
|
IComplexNDArray |
addi(IComplexNumber n) |
IComplexNDArray |
addi(IComplexNumber n,
IComplexNDArray result) |
INDArray |
addi(INDArray other)
in place (element wise) addition of two NDArrays
|
INDArray |
addi(INDArray other,
INDArray result)
in place (element wise) addition of two NDArrays
|
INDArray |
addi(Number n)
In place scalar addition
|
INDArray |
addi(Number n,
INDArray result)
In place addition
|
INDArray |
addiColumnVector(INDArray columnVector)
In place addition of a column vector
|
INDArray |
addiRowVector(INDArray rowVector)
In place addition of a row vector
|
INDArray |
addRowVector(INDArray rowVector)
Addition of a row vector (copy)
|
INDArray |
amax(int... dimension)
Returns the absolute overall max of this ndarray along given dimensions
|
Number |
amaxNumber()
Returns maximum (absolute) value in this INDArray
|
INDArray |
amean(int... dimension)
Returns the absolute overall mean of this ndarray
|
Number |
ameanNumber()
Returns the absolute overall mean of this ndarray
|
INDArray |
amin(int... dimension)
Returns minimum (absolute) value in this INDArray, along the specified dimensions
|
Number |
aminNumber()
Returns absolute min value in this INDArray
|
INDArray |
argMax(int... dimension)
This method returns index of highest value along specified dimension(s)
|
INDArray |
assign(INDArray arr)
Assign all of the elements in the given
ndarray to this ndarray
|
INDArray |
assign(Number value)
Set all entries of the ndarray to the specified value
|
INDArray |
assignIf(INDArray arr,
Condition condition)
Assign all elements from given ndarray that are matching given condition,
ndarray to this ndarray
|
INDArray |
broadcast(int... shape)
Broadcasts this ndarray to be the specified shape
|
void |
checkDimensions(INDArray other)
Validate dimensions are equal
|
void |
cleanup()
Cleanup resources
|
int |
columns()
Returns the number of columns in this matrix (throws exception if not 2d)
|
INDArray |
cond(Condition condition)
1 in the ndarray if the element matches
the condition 0 otherwise
|
INDArray |
condi(Condition condition)
In-place: 1 in the ndarray if the element matches the condition 0 otherwise
|
INDArray |
cumsum(int dimension)
Returns the cumulative sum along a dimension.
|
INDArray |
cumsumi(int dimension)
Returns the cumulative sum along a dimension.
|
INDArray |
detach()
This method detaches INDArray from Workspace, returning copy.
|
INDArray |
dimShuffle(Object[] rearrange,
int[] newOrder,
boolean[] broadCastable)
Dimshuffle: an extension of permute that adds the ability
to broadcast various dimensions.
|
double |
distance1(INDArray other)
Returns the (1-norm) distance.
|
double |
distance2(INDArray other)
Returns the (euclidean) distance.
|
IComplexNDArray |
div(IComplexNumber n) |
IComplexNDArray |
div(IComplexNumber n,
IComplexNDArray result) |
INDArray |
div(INDArray other)
Copy (element wise) division of two NDArrays
|
INDArray |
div(INDArray other,
INDArray result)
copy (element wise) division of two NDArrays
|
INDArray |
div(Number n)
Division by a number
|
INDArray |
div(Number n,
INDArray result) |
INDArray |
divColumnVector(INDArray columnVector)
Division of a column vector (copy)
|
IComplexNDArray |
divi(IComplexNumber n) |
IComplexNDArray |
divi(IComplexNumber n,
IComplexNDArray result) |
INDArray |
divi(INDArray other)
in place (element wise) division of two NDArrays
|
INDArray |
divi(INDArray other,
INDArray result)
in place (element wise) division of two NDArrays
|
INDArray |
divi(Number n)
In place scalar division
|
INDArray |
divi(Number n,
INDArray result)
In place division of this ndarray
|
INDArray |
diviColumnVector(INDArray columnVector)
In place division of a column vector
|
INDArray |
diviRowVector(INDArray rowVector)
In place division of a row vector
|
INDArray |
divRowVector(INDArray rowVector)
Division of a row vector (copy)
|
INDArray |
dup()
Returns a copy of this ndarray
|
INDArray |
dup(char order)
Returns a copy of this ndarray, where the returned ndarray has the specified order
|
Object |
element()
Returns a scalar (individual element)
of a scalar ndarray
|
int |
elementStride()
Element stride (one element to the next,
also called the defualt stride: 1 for normal
2 for complex)
|
int |
elementWiseStride()
Element wise stride
|
INDArray |
entropy(int... dimension)
Returns entropy along dimension
|
Number |
entropyNumber()
Returns entropy value for this INDArray
|
INDArray |
eps(INDArray other)
Returns the binary ndarray for "Epsilon equals" comparison.
|
INDArray |
eps(Number other)
Returns the binary ndarray for "Epsilon equals" comparison.
|
INDArray |
epsi(INDArray other)
Returns the binary ndarray for "Epsilon equals" comparison.
|
INDArray |
epsi(Number other)
Returns the binary ndarray for "Epsilon equals" comparison.
|
INDArray |
eq(INDArray other)
Returns the binary ndarray for "Equals" comparison.
|
INDArray |
eq(Number other)
Returns the binary ndarray for "Equals" comparison.
|
INDArray |
eqi(INDArray other)
Returns the binary ndarray for "Equals" comparison.
|
INDArray |
eqi(Number other)
Returns the binary ndarray for "Equals" comparison.
|
boolean |
equals(Object o) |
boolean |
equalsWithEps(Object o,
double eps)
This method checks 2 INDArrays equality with given eps
|
int[] |
flags() |
INDArray |
fmod(INDArray denominator)
remainder of division
|
INDArray |
fmod(INDArray denominator,
INDArray result)
remainder of division
|
INDArray |
fmod(Number denominator) |
INDArray |
fmod(Number denominator,
INDArray result) |
INDArray |
fmodi(INDArray denominator)
In place fmod
|
INDArray |
fmodi(Number denominator)
In place fmod
|
INDArray |
get(INDArray indices)
Get the elements from this ndarray based on the specified indices
|
INDArray |
get(INDArrayIndex... indexes)
Returns a subset of this array based on the specified
indexes
|
INDArray |
get(List<List<Integer>> indices)
Get the elements from this ndarray based on the specified indices
|
INDArray |
getColumn(int i)
Returns the specified column.
|
INDArray |
getColumns(int... columns)
Get an INDArray comprised of the specified columns only.
|
double |
getDouble(int... indices)
Get a double value at the specified indices.
|
double |
getDouble(int i)
Get the double value at the specified linear index in the array
|
double |
getDouble(int i,
int j)
Get the double value at the specified indices.
|
double |
getDoubleUnsafe(long offset)
Get a scalar
at the given linear offset
|
float |
getFloat(int i)
Return the item at the linear index i
|
float |
getFloat(int[] indices)
Returns the elements at the the specified indices
|
float |
getFloat(int i,
int j)
Return the item at row i column j
Note that this is the same as calling getScalar(new int[]{i,j}
|
int |
getInt(int... indices)
Get an integer value at the specified indices.
|
int |
getLeadingOnes()
Get the number of leading ones in the array shape.
|
protected double |
getPercentile(Number quantile,
INDArray sorted) |
INDArray |
getRow(int i)
Returns the specified row.
|
INDArray |
getRows(int... rows)
Get an INDArray comprised of the specified rows only.
|
INDArray |
getScalar(int... indices)
Returns the elements at the the specified indices
|
INDArray |
getScalar(int i)
Returns the element at the specified index
|
INDArray |
getScalar(int row,
int column)
Returns the element at the specified row/column
This will throw an exception if the
|
int |
getTrailingOnes()
Get the number of trailing ones in the array shape.
|
INDArray |
getWhere(INDArray comp,
Condition condition)
Boolean indexing:
Return the element if it fulfills the condition in
result array
|
INDArray |
getWhere(Number comp,
Condition condition)
Boolean indexing:
Return the element if it fulfills the condition in
result array
|
INDArray |
gt(INDArray other)
Returns the binary ndarray for "Greter" comparison.
|
INDArray |
gt(Number other)
Returns the binary ndarray for "Greater" comparison.
|
INDArray |
gte(Number other)
Returns binary ndarray for "Greter or equals" comparison.
|
INDArray |
gtei(Number other)
Returns the binary ndarray for "Greter or equals" comparison.
|
INDArray |
gti(INDArray other)
Returns the binary ndarray for "Greter" comparison.
|
INDArray |
gti(Number other)
Returns the binary ndarray for "Greter" comparison.
|
int[] |
hiddenDimensions() |
int |
index(int row,
int column)
Return the linear index of the specified row and column
|
protected void |
init(int[] shape) |
int |
innerMostStride()
Get the inner most stride
wrt the ordering of the array
|
boolean |
isAttached()
This method returns True, if this INDArray instance is attached to some Workspace.
|
boolean |
isCleanedUp()
Returns true if the ndarray has already been freed
|
boolean |
isColumnVector()
Checks whether the matrix is a column vector.
|
boolean |
isCompressed()
Returns true if this array is compressed, and false otherwise
|
boolean |
isInScope()
This method checks, if given attached INDArray is still in scope of its parent Workspace
PLEASE NOTE: if this INDArray isn't attached to any Workspace, this method will return true
|
boolean |
isMatrix()
Returns true if this ndarray is a matrix
|
boolean |
isRowVector()
Checks whether the matrix is a row vector.
|
boolean |
isScalar()
Returns true if this ndarray is a scalar
|
boolean |
isSparse()
Returns true if this array is sparse
|
boolean |
isSquare()
Returns whether the matrix
has the same rows and columns
|
boolean |
isVector()
Checks whether the matrix is a vector.
|
boolean |
isWrapAround()
Returns true if the ndarray
on linear indexing wraps around
based on the stride(1) of the ndarray
This is a useful optimization in linear view
where strides that might otherwise
go out of bounds but wrap around instead.
|
INDArray |
javaTensorAlongDimension(int index,
int... dimension)
Get the vector along a particular dimension
|
int |
length()
Returns the total number of elements in the ndarray
|
long |
lengthLong()
Returns the total number of elements in the ndarray
|
INDArray |
leverage()
This method detaches INDArray from current Workspace, and attaches it to Workspace above, if any.
|
INDArray |
leverageOrDetach(String id)
This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id, if a workspace
with the given ID is open and active.
|
INDArray |
leverageTo(String id)
This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id - if a workspace
with that ID exists.
|
INDArray |
leverageTo(String id,
boolean enforceExistence)
This method detaches INDArray from current Workspace, and attaches it to Workspace with a given Id.
|
int |
linearIndex(int i)
Get the linear index of the data in to
the array
|
INDArray |
linearView()
Returns a linear view reference of shape
1,length(ndarray)
|
INDArray |
linearViewColumnOrder()
Returns a linear view reference of shape
1,length(ndarray)
|
INDArray |
logEntropy(int... dimension)
Returns log entropy along dimension
|
Number |
logEntropyNumber()
Returns log entropy value for this INDArray
|
INDArray |
lt(INDArray other)
Returns the binary ndarray for "Less" comparison.
|
INDArray |
lt(Number other)
Returns the binary ndarray for "Less" comparison.
|
INDArray |
lte(Number other)
Returns the binary ndarray for "Less or equals" comparison.
|
INDArray |
ltei(Number other)
Returns the binary ndarray for "Less or equals" comparison.
|
INDArray |
lti(INDArray other)
Returns the binary ndarray for "Less" comparison.
|
INDArray |
lti(Number other)
Returns the binary ndarray for "Less" comparison.
|
int |
majorStride()
Return the major stride for an ndarray
|
void |
markAsCompressed(boolean reallyCompressed)
This method marks INDArray instance as compressed
PLEASE NOTE: Do not use this method unless you 100% have to
|
INDArray |
match(INDArray comp,
Condition condition)
Return a mask on whether each element
matches the given condition
|
INDArray |
match(Number comp,
Condition condition)
Returns a mask
|
INDArray |
max(int... dimension)
Returns the overall max of this ndarray along given dimensions
|
IComplexNumber |
maxComplex() |
Number |
maxNumber()
Returns maximum value in this INDArray
|
INDArray |
mean(INDArray result,
int... dimension)
Returns the overall mean of this ndarray
|
INDArray |
mean(int... dimension)
Returns the overall mean of this ndarray
|
IComplexNumber |
meanComplex() |
Number |
meanNumber()
Returns the overall mean of this ndarray
|
INDArray |
median(int... dimension)
This method returns median along given dimension(s)
|
Number |
medianNumber()
This method returns median value for this INDArray
|
INDArray |
migrate()
This method pulls this INDArray into current Workspace.
|
INDArray |
migrate(boolean detachIfNoWs)
This method pulls this INDArray into current Workspace, or optionally detaches if no workspace is present.
That is: If current workspace is present/active, INDArray is migrated to it. If no current workspace is present/active, one of two things occur: 1. |
INDArray |
min(int... dimension)
Returns the overall min of this ndarray
|
IComplexNumber |
minComplex() |
Number |
minNumber()
Returns min value in this INDArray
|
INDArray |
mmul(INDArray other)
Perform a copy matrix multiplication
|
INDArray |
mmul(INDArray other,
INDArray result)
Perform an copy matrix multiplication
|
INDArray |
mmuli(INDArray other)
Perform an inplace matrix multiplication
|
INDArray |
mmuli(INDArray other,
INDArray result)
Perform an inplace matrix multiplication
|
IComplexNDArray |
mul(IComplexNumber n) |
IComplexNDArray |
mul(IComplexNumber n,
IComplexNDArray result) |
INDArray |
mul(INDArray other)
copy (element wise) multiplication of two NDArrays
|
INDArray |
mul(INDArray other,
INDArray result)
copy (element wise) multiplication of two NDArrays
|
INDArray |
mul(Number n)
Scalar multiplication (copy)
|
INDArray |
mul(Number n,
INDArray result) |
INDArray |
mulColumnVector(INDArray columnVector)
Multiplication of a column vector (copy)
|
IComplexNDArray |
muli(IComplexNumber n) |
IComplexNDArray |
muli(IComplexNumber n,
IComplexNDArray result) |
INDArray |
muli(INDArray other)
in place (element wise) multiplication of two NDArrays
|
INDArray |
muli(INDArray other,
INDArray result)
in place (element wise) multiplication of two NDArrays
|
INDArray |
muli(Number n)
In place scalar multiplication
|
INDArray |
muli(Number n,
INDArray result)
In place multiplication of this ndarray
|
INDArray |
muliColumnVector(INDArray columnVector)
In place multiplication of a column vector
|
INDArray |
muliRowVector(INDArray rowVector)
In place multiplication of a row vector
|
INDArray |
mulRowVector(INDArray rowVector)
Multiplication of a row vector (copy)
|
INDArray |
neg()
Returns the ndarray negative (cloned)
|
INDArray |
negi()
In place setting of the negative version of this ndarray
|
INDArray |
neq(INDArray other)
Returns the binary ndarray for "Not equals" comparison.
|
INDArray |
neq(Number other)
Returns the binary ndarray for "Not equals" comparison.
|
INDArray |
neqi(INDArray other)
Returns the binary ndarray for "Not equals" comparison.
|
INDArray |
neqi(Number other)
Returns the binary ndarray for "Not equals" comparison.
|
int |
nnz()
Return the number of non-null element
|
INDArray |
norm1(int... dimension)
Returns the norm1 (L1 norm, i.e., sum of absolute values; also known as Taxicab or Manhattan norm) along the
specified dimension
|
IComplexNumber |
norm1Complex()
Calculate and return norm1 (L1 norm, i.e., sum of absolute values; also known as Taxicab or Manhattan norm) for
the entire array
|
Number |
norm1Number()
Calculate and return norm1 (L1 norm, i.e., sum of absolute values; also known as Taxicab or Manhattan norm) for
the entire array
|
INDArray |
norm2(int... dimension)
Returns the norm2 (L2 norm, sqrt(sum(x_i^2), also known as Euclidean norm) along the specified dimension(s)
|
IComplexNumber |
norm2Complex() |
Number |
norm2Number()
Return the norm2 (L2 norm, sqrt(sum(x_i^2), also known as Euclidean norm) for the entire array
|
INDArray |
normmax(int... dimension)
Returns the max norm (aka infinity norm, equal to the maximum absolute value) along the specified dimension(s)
|
IComplexNumber |
normmaxComplex() |
Number |
normmaxNumber()
Return the max norm (aka infinity norm, equal to the maximum absolute value) for the entire array
|
long |
offset()
Returns the start of where the ndarray is
for the underlying data
|
char |
ordering()
Return the ordering (fortran or c 'f' and 'c' respectively) of this ndarray
|
long |
originalOffset()
Returns the start of where the ndarray is for the original data buffer
|
INDArray |
percentile(Number quantile,
int... dimension)
This method returns median along given dimension(s)
|
Number |
percentileNumber(Number quantile)
This method returns percentile value for this INDArray
|
INDArray |
permute(int... rearrange)
See: http://www.mathworks.com/help/matlab/ref/permute.html
|
INDArray |
permutei(int... rearrange)
An in-place version of permute.
|
INDArray |
prod(int... dimension)
Returns the product along a given dimension
|
IComplexNumber |
prodComplex() |
Number |
prodNumber()
Calculate the product of all values in the array
|
INDArray |
put(INDArray indices,
INDArray element)
Put element in to the indices denoted by
the indices ndarray.
|
INDArray |
put(INDArrayIndex[] indices,
INDArray element)
Put the elements of the ndarray
in to the specified indices
|
INDArray |
put(INDArrayIndex[] indices,
Number element)
Put the elements of the ndarray
in to the specified indices
|
INDArray |
put(int[] indices,
INDArray element)
Inserts the element at the specified index
|
INDArray |
put(int i,
INDArray element)
Inserts the element at the specified index
|
INDArray |
put(int i,
int j,
INDArray element)
Inserts the element at the specified index
|
INDArray |
put(int i,
int j,
Number element)
Inserts the element at the specified index
|
INDArray |
put(List<List<Integer>> indices,
INDArray element)
Put element in to the indices denoted by
the indices ndarray.
|
INDArray |
putColumn(int column,
INDArray toPut)
Insert a column in to this array
Will throw an exception if this
ndarray is not a matrix
|
INDArray |
putRow(int row,
INDArray toPut)
Insert a row in to this array
Will throw an exception if this
ndarray is not a matrix
|
INDArray |
putScalar(int[] i,
double value)
Insert the item at the specified indices
|
INDArray |
putScalar(int[] indexes,
float value)
Put the specified float value at the specified indices in this array
|
INDArray |
putScalar(int[] indexes,
int value)
Put the specified integer value at the specified indices in this array
|
INDArray |
putScalar(int i,
double value)
Insert the number linearly in to the ndarray
|
INDArray |
putScalar(int i,
float value)
Insert a scalar float at the specified index
|
INDArray |
putScalar(int i,
int value)
Insert a scalar int at the specified index
|
INDArray |
putScalar(int row,
int col,
double value)
Insert the value at the specified indices, in a 2d (rank 2) NDArray
Equivalent to INDArray.putScalar(int[], double) but avoids int[] creation |
INDArray |
putScalar(int dim0,
int dim1,
int dim2,
double value)
Insert the value at the specified indices, in a 3d (rank 3) NDArray
Equivalent to INDArray.putScalar(int[], double) but avoids int[] creation |
INDArray |
putScalar(int dim0,
int dim1,
int dim2,
int dim3,
double value)
Insert the value at the specified indices, in a 4d (rank 4) NDArray
Equivalent to INDArray.putScalar(int[], double) but avoids int[] creation |
INDArray |
putScalarUnsafe(long offset,
double value)
Insert a scalar
at the given linear offset
|
INDArray |
putSlice(int slice,
INDArray put)
Assigns the given matrix (put) to the specified slice
|
INDArray |
putWhere(INDArray comp,
INDArray put,
Condition condition)
Assign the element according
to the comparison array
|
INDArray |
putWhere(Number comp,
INDArray put,
Condition condition)
Assign the element according
to the comparison array
|
INDArray |
putWhere(Number comp,
Number put,
Condition condition)
Assign the element according
to the comparison array
|
INDArray |
putWhereWithMask(INDArray mask,
INDArray put)
Use a pre computed mask
for assigning arrays
|
INDArray |
putWhereWithMask(INDArray mask,
Number put)
Use a pre computed mask
for assigning arrays
|
int |
rank()
Returns the rank of the ndarray (the number of dimensions).
|
INDArray |
ravel()
Returns a flattened version (row vector) of this ndarray
|
INDArray |
ravel(char order)
Returns a flattened version (row vector) of this ndarray
|
IComplexNDArray |
rdiv(IComplexNumber n) |
IComplexNDArray |
rdiv(IComplexNumber n,
IComplexNDArray result) |
INDArray |
rdiv(INDArray other)
Reverse division, elements wise.
|
INDArray |
rdiv(INDArray other,
INDArray result)
Reverse division
|
INDArray |
rdiv(Number n)
Reverse division with a scalar - i.e., (n / thisArrayValues)
|
INDArray |
rdiv(Number n,
INDArray result)
Reverse division (number / ndarray)
|
INDArray |
rdivColumnVector(INDArray columnVector)
Reverse division of a column vector (copy)
|
IComplexNDArray |
rdivi(IComplexNumber n) |
IComplexNDArray |
rdivi(IComplexNumber n,
IComplexNDArray result) |
INDArray |
rdivi(INDArray other)
Reverse divsion (in place).
|
INDArray |
rdivi(INDArray other,
INDArray result)
Reverse division (in-place)
|
INDArray |
rdivi(Number n)
In place reverse division - i.e., (n / thisArrayValues)
|
INDArray |
rdivi(Number n,
INDArray result)
Reverse in place division
|
INDArray |
rdiviColumnVector(INDArray columnVector)
In place reverse divison of a column vector
|
INDArray |
rdiviRowVector(INDArray rowVector)
In place reverse division of a column vector
|
INDArray |
rdivRowVector(INDArray rowVector)
Reverse division of a column vector (copy)
|
protected DataBuffer |
reallocate(DataBuffer buffer) |
INDArray |
remainder(INDArray denominator)
Remainder operator
|
INDArray |
remainder(INDArray denominator,
INDArray result)
Remainder operator
|
INDArray |
remainder(Number denominator)
The scalar denominator
|
INDArray |
remainder(Number denominator,
INDArray result) |
INDArray |
remainderi(INDArray denominator)
In place remainder
|
INDArray |
remainderi(Number denominator)
In place remainder
|
INDArray |
repeat(int dimension,
int... repeats)
Repeat elements along a specified dimension.
|
INDArray |
replaceWhere(INDArray arr,
Condition condition)
Replaces all elements in this ndarray that are matching give condition, with corresponding elements from given array
|
INDArray |
repmat(int... shape)
Replicate and tile array to fill out to the given shape
|
void |
resetLinearView()
Resets the linear view
|
INDArray |
reshape(char order,
int... newShape)
Reshapes the ndarray (can't change the length of the ndarray).
|
INDArray |
reshape(char order,
int rows,
int columns)
Reshapes the ndarray (can't change the length of the ndarray).
|
INDArray |
reshape(int... newShape)
Reshapes the ndarray (can't change the length of the ndarray).
|
INDArray |
reshape(int rows,
int columns)
Reshapes the ndarray (can't change the length of the ndarray).
|
int |
rows()
Returns the number of rows in this matrix (throws exception if not 2d)
|
IComplexNDArray |
rsub(IComplexNumber n) |
IComplexNDArray |
rsub(IComplexNumber n,
IComplexNDArray result) |
INDArray |
rsub(INDArray other)
Element-wise reverse subtraction (copy op).
|
INDArray |
rsub(INDArray other,
INDArray result)
Reverse subtraction
|
INDArray |
rsub(Number n)
Reverse subtraction with duplicates - i.e., (n - thisArrayValues)
|
INDArray |
rsub(Number n,
INDArray result)
Reverse subtraction
|
INDArray |
rsubColumnVector(INDArray columnVector)
Reverse subtraction of a column vector (copy)
|
IComplexNDArray |
rsubi(IComplexNumber n) |
IComplexNDArray |
rsubi(IComplexNumber n,
IComplexNDArray result) |
INDArray |
rsubi(INDArray other)
Element-wise reverse subtraction (in the place op) - i.e., other - this
|
INDArray |
rsubi(INDArray other,
INDArray result)
Reverse subtraction (in-place)
|
INDArray |
rsubi(Number n)
Reverse subtraction in place - i.e., (n - thisArrayValues)
|
INDArray |
rsubi(Number n,
INDArray result)
Reverse in place subtraction
|
INDArray |
rsubiColumnVector(INDArray columnVector)
In place reverse subtraction of a column vector
|
INDArray |
rsubiRowVector(INDArray rowVector)
In place reverse subtraction of a row vector
|
INDArray |
rsubRowVector(INDArray rowVector)
Reverse subtraction of a row vector (copy)
|
Number |
scan(Condition condition)
This method takes boolean condition, and returns number of elements matching this condition
|
int |
secondaryStride()
Return the second stride for an ndarray.
|
void |
setData(DataBuffer data) |
void |
setOrder(char order)
Set the ordering
|
void |
setShape(int... shape)
Shape setter
|
void |
setShapeAndStride(int[] shape,
int[] stride)
Shape and stride setter
|
protected void |
setShapeInformation(org.nd4j.linalg.primitives.Pair<DataBuffer,int[]> shapeInfo) |
void |
setStride(int... stride)
stride setter
|
void |
setWrapAround(boolean wrapAround)
Set the ndarray to wrap around
|
INDArray |
shannonEntropy(int... dimension)
Returns non-normalized Shannon entropy along dimension
|
Number |
shannonEntropyNumber()
Returns non-normalized Shannon entropy value for this INDArray
|
int[] |
shape()
Returns the shape of this ndarray
|
IntBuffer |
shapeInfo()
Shape info
|
DataBuffer |
shapeInfoDataBuffer()
Shape info
|
String |
shapeInfoToString()
Returns the shape information debugging
information
|
protected DataBuffer |
shapeOf() |
int |
size(int dimension)
Returns the size along a specified dimension
|
INDArray |
slice(int i)
Returns the specified slice of this ndarray
|
INDArray |
slice(int i,
int dimension)
Returns the specified slice of this ndarray
|
int |
slices()
Returns the number of slices in this ndarray
|
void |
sliceVectors(List<INDArray> list) |
DataBuffer |
sparseInfoDataBuffer()
Sparse info
|
int[] |
sparseOffsets() |
double |
squaredDistance(INDArray other)
Returns the square of the Euclidean distance.
|
INDArray |
std(boolean biasCorrected,
int... dimension)
Standard deviation of an ndarray along a dimension
|
INDArray |
std(int... dimension)
Standard deviation of an INDArray along one or more dimensions
|
IComplexNumber |
stdComplex() |
Number |
stdNumber()
Calculate the standard deviation for the entire array
|
Number |
stdNumber(boolean biasCorrected)
Calculate the standard deviation for the entire array, specifying whether it is bias corrected or not
|
int[] |
stride()
Returns the stride of this ndarray
|
int |
stride(int dimension)
Calculate the stride along a particular dimension
|
protected DataBuffer |
strideOf() |
IComplexNDArray |
sub(IComplexNumber n) |
IComplexNDArray |
sub(IComplexNumber n,
IComplexNDArray result) |
INDArray |
sub(INDArray other)
copy subtraction of two NDArrays
|
INDArray |
sub(INDArray other,
INDArray result)
copy subtraction of two NDArrays
|
INDArray |
sub(Number n)
Scalar subtraction (copied)
|
INDArray |
sub(Number n,
INDArray result) |
INDArray |
subArray(long[] offsets,
int[] shape,
int[] stride) |
INDArray |
subArray(ShapeOffsetResolution resolution)
Sub array based on the
pre calculated shape,strides, offsets
|
INDArray |
subColumnVector(INDArray columnVector)
Subtraction of a column vector (copy)
|
IComplexNDArray |
subi(IComplexNumber n) |
IComplexNDArray |
subi(IComplexNumber n,
IComplexNDArray result) |
INDArray |
subi(INDArray other)
in place (element wise) subtraction of two NDArrays
|
INDArray |
subi(INDArray other,
INDArray result)
in place (element wise) subtraction of two NDArrays
|
INDArray |
subi(Number n)
In place scalar subtraction
|
INDArray |
subi(Number n,
INDArray result)
In place subtraction of this ndarray
|
INDArray |
subiColumnVector(INDArray columnVector)
In place subtraction of a column vector
|
INDArray |
subiRowVector(INDArray rowVector)
In place subtraction of a row vector
|
INDArray |
subRowVector(INDArray rowVector)
Subtraction of a row vector (copy)
|
INDArray |
sum(INDArray result,
int... dimension)
Returns the sum along the last dimension of this ndarray
|
INDArray |
sum(int... dimension)
Returns the sum along the last dimension of this ndarray
|
IComplexNumber |
sumComplex()
Sum the entire array
|
Number |
sumNumber()
Sum the entire array
|
INDArray |
swapAxes(int dimension,
int with)
Mainly here for people coming from numpy.
|
INDArray |
tensorAlongDimension(int index,
int... dimension)
Get the vector along a particular dimension
|
int |
tensorssAlongDimension(int... dimension)
Returns the number of possible vectors for a given dimension
|
INDArray |
toDense()
Return a dense representation of the sparse ndarray
|
double[][] |
toDoubleMatrix()
Convert this ndarray to a 2d double matrix.
|
double[] |
toDoubleVector()
Convert this ndarray to a 1d double matrix.
|
float[][] |
toFloatMatrix()
Convert this ndarray to a 2d float matrix.
|
float[] |
toFloatVector()
Convert this ndarray to a 1d float vector.
|
int[][] |
toIntMatrix()
Convert this ndarray to a 2d int matrix.
|
int[] |
toIntVector()
Convert this ndarray to a 1d int matrix.
|
INDArray |
transpose()
Flip the rows and columns of a matrix
|
INDArray |
transposei()
Flip the rows and columns of a matrix, in-place
|
INDArray |
unsafeDuplication()
Perform efficient (but unsafe) duplication.
|
INDArray |
unsafeDuplication(boolean blocking)
Perform efficient (but unsafe) duplication.
|
INDArray |
var(boolean biasCorrected,
int... dimension)
Returns the overall variance of this ndarray
|
INDArray |
var(int... dimension)
Returns the overall variance of this ndarray
|
IComplexNumber |
varComplex() |
Number |
varNumber()
Returns the overall variance of all values in this INDArray
|
INDArray |
vectorAlongDimension(int index,
int dimension)
Get the vector along a particular dimension
|
int |
vectorsAlongDimension(int dimension)
Returns the number of possible vectors for a given dimension
|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getVectorCoordinates
convertToDoubles, convertToFloats, data, isView, mmul, mmul, mmuli, mmuli, putiColumnVector, putiRowVector, toFlatArray, underlyingRank
protected static final double THRESHOLD_MEMORY_ALLOCATION
protected int rows
protected int columns
protected int rank
protected Boolean isVector
protected Boolean isMatrix
protected Boolean isScalar
protected long length
public static final boolean isSparse
protected transient volatile DataBuffer shapeInformation
protected transient volatile int[] javaShapeInformation
protected transient volatile DataBuffer sparseInformation
protected transient DataBuffer shape
protected transient DataBuffer stride
protected DataBuffer reallocate(DataBuffer buffer)
public INDArray get(INDArray indices)
INDArray
public double[][] toDoubleMatrix()
INDArray
toDoubleMatrix
in interface INDArray
public double[] toDoubleVector()
INDArray
toDoubleVector
in interface INDArray
public float[] toFloatVector()
INDArray
toFloatVector
in interface INDArray
public float[][] toFloatMatrix()
INDArray
toFloatMatrix
in interface INDArray
public int[] toIntVector()
INDArray
toIntVector
in interface INDArray
public int[][] toIntMatrix()
INDArray
toIntMatrix
in interface INDArray
public INDArray match(INDArray comp, Condition condition)
INDArray
public INDArray match(Number comp, Condition condition)
INDArray
public INDArray putWhereWithMask(INDArray mask, INDArray put)
INDArray
putWhereWithMask
in interface INDArray
mask
- the mask to useput
- the array to putpublic INDArray putWhereWithMask(INDArray mask, Number put)
INDArray
putWhereWithMask
in interface INDArray
mask
- the mask to useput
- the array to putpublic INDArray toDense()
ISparseNDArray
toDense
in interface INDArray
toDense
in interface ISparseNDArray
public INDArray getWhere(INDArray comp, Condition condition)
INDArray
public INDArray getWhere(Number comp, Condition condition)
INDArray
public INDArray putWhere(INDArray comp, INDArray put, Condition condition)
INDArray
public INDArray putWhere(Number comp, INDArray put, Condition condition)
INDArray
public INDArray putWhere(Number comp, Number put, Condition condition)
INDArray
public INDArray get(List<List<Integer>> indices)
INDArray
public INDArray put(List<List<Integer>> indices, INDArray element)
INDArray
public INDArray put(INDArray indices, INDArray element)
INDArray
public boolean isSparse()
INDArray
public int length()
INDArray
public int nnz()
ISparseNDArray
nnz
in interface INDArray
nnz
in interface ISparseNDArray
public long lengthLong()
INDArray
lengthLong
in interface INDArray
protected void init(int[] shape)
public String shapeInfoToString()
INDArray
shapeInfoToString
in interface INDArray
public DataBuffer shapeInfoDataBuffer()
INDArray
shapeInfoDataBuffer
in interface INDArray
public DataBuffer sparseInfoDataBuffer()
INDArray
sparseInfoDataBuffer
in interface INDArray
public boolean isCompressed()
INDArray
isCompressed
in interface INDArray
public void markAsCompressed(boolean reallyCompressed)
INDArray
markAsCompressed
in interface INDArray
public void setWrapAround(boolean wrapAround)
INDArray
setWrapAround
in interface INDArray
wrapAround
- thewrap aroundpublic boolean isWrapAround()
INDArray
isWrapAround
in interface INDArray
public int rank()
INDArray
public int[] hiddenDimensions()
hiddenDimensions
in interface INDArray
public int[] sparseOffsets()
sparseOffsets
in interface INDArray
public int stride(int dimension)
INDArray
protected DataBuffer strideOf()
public int elementStride()
INDArray
elementStride
in interface INDArray
public int elementWiseStride()
INDArray
elementWiseStride
in interface INDArray
public boolean isCleanedUp()
INDArray
isCleanedUp
in interface INDArray
public void cleanup()
INDArray
public void resetLinearView()
INDArray
resetLinearView
in interface INDArray
public int secondaryStride()
INDArray
secondaryStride
in interface INDArray
public double getDoubleUnsafe(long offset)
INDArray
getDoubleUnsafe
in interface INDArray
offset
- the offset to get atpublic INDArray putScalarUnsafe(long offset, double value)
INDArray
putScalarUnsafe
in interface INDArray
offset
- the offset to insert atvalue
- the value to insertpublic int majorStride()
INDArray
majorStride
in interface INDArray
public int innerMostStride()
INDArray
innerMostStride
in interface INDArray
public INDArray linearView()
INDArray
linearView
in interface INDArray
public INDArray linearViewColumnOrder()
INDArray
linearViewColumnOrder
in interface INDArray
public int vectorsAlongDimension(int dimension)
INDArray
vectorsAlongDimension
in interface INDArray
dimension
- the dimension to calculate the number of vectors forpublic INDArray vectorAlongDimension(int index, int dimension)
INDArray
vectorAlongDimension
in interface INDArray
index
- the index of the vector to getScalardimension
- the dimension to getScalar the vector frompublic int tensorssAlongDimension(int... dimension)
INDArray
tensorssAlongDimension
in interface INDArray
dimension
- the dimension to calculate the number of vectors forpublic INDArray tensorAlongDimension(int index, int... dimension)
INDArray
tensorAlongDimension
in interface INDArray
index
- the index of the vector to getScalardimension
- the dimension to getScalar the vector frompublic INDArray javaTensorAlongDimension(int index, int... dimension)
INDArray
javaTensorAlongDimension
in interface INDArray
index
- the index of the vector to getScalardimension
- the dimension to getScalar the vector frompublic INDArray cumsumi(int dimension)
INDArray
public INDArray cumsum(int dimension)
INDArray
public INDArray assign(INDArray arr)
INDArray
public INDArray assignIf(INDArray arr, Condition condition)
INDArray
public INDArray replaceWhere(INDArray arr, Condition condition)
INDArray
replaceWhere
in interface INDArray
arr
- Source arraycondition
- Condition to applypublic INDArray putScalar(int i, double value)
INDArray
public INDArray putScalar(int i, float value)
INDArray
public INDArray putScalar(int i, int value)
INDArray
public INDArray putScalar(int[] i, double value)
INDArray
public INDArray putScalar(int row, int col, double value)
INDArray
INDArray.putScalar(int[], double)
but avoids int[] creationpublic INDArray putScalar(int dim0, int dim1, int dim2, double value)
INDArray
INDArray.putScalar(int[], double)
but avoids int[] creationpublic INDArray putScalar(int dim0, int dim1, int dim2, int dim3, double value)
INDArray
INDArray.putScalar(int[], double)
but avoids int[] creationpublic INDArray lt(Number other)
INDArray
public INDArray lti(Number other)
INDArray
public INDArray putScalar(int[] indexes, float value)
INDArray
public INDArray putScalar(int[] indexes, int value)
INDArray
public INDArray eps(Number other)
INDArray
public INDArray epsi(Number other)
INDArray
public INDArray eq(Number other)
INDArray
public INDArray eqi(Number other)
INDArray
public INDArray gt(Number other)
INDArray
public INDArray gte(Number other)
INDArray
public INDArray lte(Number other)
INDArray
public INDArray gtei(Number other)
INDArray
public INDArray ltei(Number other)
INDArray
public INDArray gti(Number other)
INDArray
public INDArray lt(INDArray other)
INDArray
public INDArray lti(INDArray other)
INDArray
public INDArray eps(INDArray other)
INDArray
public INDArray epsi(INDArray other)
INDArray
public INDArray neq(Number other)
INDArray
public INDArray neqi(Number other)
INDArray
public INDArray neq(INDArray other)
INDArray
public INDArray neqi(INDArray other)
INDArray
public INDArray eq(INDArray other)
INDArray
public INDArray eqi(INDArray other)
INDArray
public INDArray gt(INDArray other)
INDArray
public INDArray gti(INDArray other)
INDArray
public INDArray neg()
INDArray
public INDArray negi()
INDArray
public INDArray rdiv(Number n)
INDArray
public INDArray rdivi(Number n)
INDArray
public INDArray rsub(Number n)
INDArray
public INDArray rsubi(Number n)
INDArray
public INDArray divi(Number n)
INDArray
public INDArray mul(Number n)
INDArray
public INDArray muli(Number n)
INDArray
public INDArray sub(Number n)
INDArray
public INDArray subi(Number n)
INDArray
public INDArray add(Number n)
INDArray
public INDArray addi(Number n)
INDArray
public INDArray rdiv(Number n, INDArray result)
INDArray
public INDArray rdivi(Number n, INDArray result)
INDArray
public INDArray rsub(Number n, INDArray result)
INDArray
public INDArray rsubi(Number n, INDArray result)
INDArray
public INDArray divi(Number n, INDArray result)
INDArray
public INDArray muli(Number n, INDArray result)
INDArray
public INDArray subi(Number n, INDArray result)
INDArray
public INDArray addi(Number n, INDArray result)
INDArray
public INDArray get(INDArrayIndex... indexes)
INDArray
public INDArray getColumns(int... columns)
INDArray
getColumns
in interface INDArray
columns
- Columns to extract out of the current arraypublic INDArray getRows(int... rows)
INDArray
public INDArray rdiv(INDArray other)
INDArray
public INDArray rdivi(INDArray other)
INDArray
public INDArray rdiv(INDArray other, INDArray result)
INDArray
public INDArray rdivi(INDArray other, INDArray result)
INDArray
public INDArray rsub(INDArray other, INDArray result)
INDArray
public INDArray rsub(INDArray other)
INDArray
public INDArray rsubi(INDArray other)
INDArray
public INDArray rsubi(INDArray other, INDArray result)
INDArray
public INDArray assign(Number value)
INDArray
public int linearIndex(int i)
INDArray
linearIndex
in interface INDArray
i
- the index to getScalarpublic void checkDimensions(INDArray other)
INDArray
checkDimensions
in interface INDArray
other
- the other ndarray to comparepublic void sliceVectors(List<INDArray> list)
sliceVectors
in interface INDArray
public INDArray putSlice(int slice, INDArray put)
INDArray
public INDArray cond(Condition condition)
INDArray
public INDArray condi(Condition condition)
INDArray
public INDArray repmat(int... shape)
INDArray
public INDArray repeat(int dimension, int... repeats)
INDArray
public INDArray putRow(int row, INDArray toPut)
INDArray
public INDArray putColumn(int column, INDArray toPut)
INDArray
public INDArray getScalar(int row, int column)
INDArray
public INDArray getScalar(int i)
INDArray
public int index(int row, int column)
INDArray
public double squaredDistance(INDArray other)
INDArray
squaredDistance
in interface INDArray
public double distance2(INDArray other)
INDArray
public double distance1(INDArray other)
INDArray
public INDArray put(INDArrayIndex[] indices, INDArray element)
INDArray
public INDArray put(INDArrayIndex[] indices, Number element)
INDArray
public INDArray put(int[] indices, INDArray element)
INDArray
public INDArray put(int i, int j, INDArray element)
INDArray
public INDArray put(int i, int j, Number element)
INDArray
public INDArray put(int i, INDArray element)
INDArray
public INDArray diviColumnVector(INDArray columnVector)
INDArray
diviColumnVector
in interface INDArray
columnVector
- the column vector used for divisionpublic INDArray divColumnVector(INDArray columnVector)
INDArray
divColumnVector
in interface INDArray
columnVector
- the column vector used for divisionpublic INDArray diviRowVector(INDArray rowVector)
INDArray
diviRowVector
in interface INDArray
rowVector
- the row vector used for divisionpublic INDArray divRowVector(INDArray rowVector)
INDArray
divRowVector
in interface INDArray
rowVector
- the row vector used for divisionpublic INDArray rdiviColumnVector(INDArray columnVector)
INDArray
rdiviColumnVector
in interface INDArray
columnVector
- the column vector used for divisionpublic INDArray rdivColumnVector(INDArray columnVector)
INDArray
rdivColumnVector
in interface INDArray
columnVector
- the column vector used for divisionpublic INDArray rdiviRowVector(INDArray rowVector)
INDArray
rdiviRowVector
in interface INDArray
rowVector
- the row vector used for divisionpublic INDArray rdivRowVector(INDArray rowVector)
INDArray
rdivRowVector
in interface INDArray
rowVector
- the row vector used for divisionpublic INDArray muliColumnVector(INDArray columnVector)
INDArray
muliColumnVector
in interface INDArray
columnVector
- the column vector used for multiplicationpublic INDArray mulColumnVector(INDArray columnVector)
INDArray
mulColumnVector
in interface INDArray
columnVector
- the column vector used for multiplicationpublic INDArray muliRowVector(INDArray rowVector)
INDArray
muliRowVector
in interface INDArray
rowVector
- the row vector used for multiplicationpublic INDArray mulRowVector(INDArray rowVector)
INDArray
mulRowVector
in interface INDArray
rowVector
- the row vector used for multiplicationpublic INDArray rsubiColumnVector(INDArray columnVector)
INDArray
rsubiColumnVector
in interface INDArray
columnVector
- the column vector to subtractpublic INDArray rsubColumnVector(INDArray columnVector)
INDArray
rsubColumnVector
in interface INDArray
columnVector
- the column vector to subtractpublic INDArray rsubiRowVector(INDArray rowVector)
INDArray
rsubiRowVector
in interface INDArray
rowVector
- the row vector to subtractpublic INDArray rsubRowVector(INDArray rowVector)
INDArray
rsubRowVector
in interface INDArray
rowVector
- the row vector to subtractpublic INDArray subiColumnVector(INDArray columnVector)
INDArray
subiColumnVector
in interface INDArray
columnVector
- the column vector to subtractpublic INDArray subColumnVector(INDArray columnVector)
INDArray
subColumnVector
in interface INDArray
columnVector
- the column vector to subtractpublic INDArray subiRowVector(INDArray rowVector)
INDArray
subiRowVector
in interface INDArray
rowVector
- the row vector to subtractpublic INDArray subRowVector(INDArray rowVector)
INDArray
subRowVector
in interface INDArray
rowVector
- the row vector to subtractpublic INDArray addiColumnVector(INDArray columnVector)
INDArray
addiColumnVector
in interface INDArray
columnVector
- the column vector to addpublic INDArray addColumnVector(INDArray columnVector)
INDArray
addColumnVector
in interface INDArray
columnVector
- the column vector to addpublic INDArray addiRowVector(INDArray rowVector)
INDArray
addiRowVector
in interface INDArray
rowVector
- the row vector to addpublic INDArray addRowVector(INDArray rowVector)
INDArray
addRowVector
in interface INDArray
rowVector
- the row vector to addpublic INDArray mmul(INDArray other)
INDArray
public INDArray mmul(INDArray other, INDArray result)
INDArray
public INDArray div(INDArray other)
INDArray
public INDArray div(INDArray other, INDArray result)
INDArray
public INDArray mul(INDArray other)
INDArray
public INDArray mul(INDArray other, INDArray result)
INDArray
public INDArray sub(INDArray other)
INDArray
public INDArray sub(INDArray other, INDArray result)
INDArray
public INDArray add(INDArray other)
INDArray
public INDArray add(INDArray other, INDArray result)
INDArray
public INDArray mmuli(INDArray other)
INDArray
public INDArray mmuli(INDArray other, INDArray result)
INDArray
public INDArray divi(INDArray other)
INDArray
public INDArray divi(INDArray other, INDArray result)
INDArray
public INDArray muli(INDArray other)
INDArray
public INDArray muli(INDArray other, INDArray result)
INDArray
public INDArray subi(INDArray other)
INDArray
public INDArray subi(INDArray other, INDArray result)
INDArray
public INDArray addi(INDArray other)
INDArray
public INDArray addi(INDArray other, INDArray result)
INDArray
public INDArray normmax(int... dimension)
INDArray
public Number normmaxNumber()
INDArray
normmaxNumber
in interface INDArray
public IComplexNumber normmaxComplex()
normmaxComplex
in interface INDArray
public INDArray norm2(int... dimension)
INDArray
public Number norm2Number()
INDArray
norm2Number
in interface INDArray
public IComplexNumber norm2Complex()
norm2Complex
in interface INDArray
public INDArray norm1(int... dimension)
INDArray
public Number norm1Number()
INDArray
norm1Number
in interface INDArray
public IComplexNumber norm1Complex()
INDArray
norm1Complex
in interface INDArray
public INDArray std(int... dimension)
INDArray
public Number stdNumber()
INDArray
public INDArray std(boolean biasCorrected, int... dimension)
INDArray
public Number stdNumber(boolean biasCorrected)
INDArray
public IComplexNumber stdComplex()
stdComplex
in interface INDArray
public INDArray prod(int... dimension)
INDArray
public Number prodNumber()
INDArray
prodNumber
in interface INDArray
public IComplexNumber prodComplex()
prodComplex
in interface INDArray
public INDArray mean(int... dimension)
INDArray
public Number meanNumber()
INDArray
meanNumber
in interface INDArray
public IComplexNumber meanComplex()
meanComplex
in interface INDArray
public INDArray var(int... dimension)
INDArray
public INDArray var(boolean biasCorrected, int... dimension)
INDArray
public Number varNumber()
INDArray
public IComplexNumber varComplex()
varComplex
in interface INDArray
public INDArray max(int... dimension)
INDArray
public Number maxNumber()
INDArray
public IComplexNumber maxComplex()
maxComplex
in interface INDArray
public INDArray min(int... dimension)
INDArray
public Number minNumber()
INDArray
public IComplexNumber minComplex()
minComplex
in interface INDArray
public INDArray sum(int... dimension)
INDArray
public Number sumNumber()
INDArray
public IComplexNumber sumComplex()
INDArray
sumComplex
in interface INDArray
public void setStride(int... stride)
INDArray
public void setShape(int... shape)
INDArray
public void setShapeAndStride(int[] shape, int[] stride)
INDArray
setShapeAndStride
in interface INDArray
public void setOrder(char order)
INDArray
public INDArray subArray(ShapeOffsetResolution resolution)
INDArray
public INDArray subArray(long[] offsets, int[] shape, int[] stride)
public INDArray getScalar(int... indices)
INDArray
public int getInt(int... indices)
INDArray
public double getDouble(int... indices)
INDArray
public float getFloat(int[] indices)
INDArray
public double getDouble(int i)
INDArray
public double getDouble(int i, int j)
INDArray
public float getFloat(int i)
INDArray
public float getFloat(int i, int j)
INDArray
public INDArray dup()
INDArray
public INDArray dup(char order)
INDArray
public INDArray ravel()
INDArray
public INDArray ravel(char order)
INDArray
public void setData(DataBuffer data)
public int slices()
INDArray
public int getTrailingOnes()
INDArray
getTrailingOnes
in interface INDArray
public int getLeadingOnes()
INDArray
getLeadingOnes
in interface INDArray
public INDArray slice(int i, int dimension)
INDArray
public INDArray slice(int i)
INDArray
public long offset()
INDArray
public long originalOffset()
INDArray
originalOffset
in interface INDArray
public INDArray reshape(char order, int... newShape)
INDArray
public INDArray reshape(char order, int rows, int columns)
INDArray
public INDArray reshape(int... newShape)
INDArray
public INDArray reshape(int rows, int columns)
INDArray
public INDArray transpose()
INDArray
public INDArray transposei()
INDArray
transposei
in interface INDArray
public INDArray swapAxes(int dimension, int with)
INDArray
public INDArray permute(int... rearrange)
INDArray
public INDArray permutei(int... rearrange)
INDArray
public INDArray dimShuffle(Object[] rearrange, int[] newOrder, boolean[] broadCastable)
INDArray
dimShuffle
in interface INDArray
rearrange
- the dimensions to swap tonewOrder
- the new order (think permute)broadCastable
- (whether the dimension is broadcastable) (must be same length as new order)public INDArray getColumn(int i)
INDArray
public INDArray getRow(int i)
INDArray
public int columns()
INDArray
public int rows()
INDArray
public boolean isVector()
public boolean isSquare()
INDArray
public boolean isRowVector()
isRowVector
in interface INDArray
public boolean isColumnVector()
isColumnVector
in interface INDArray
public boolean isMatrix()
INDArray
public boolean isScalar()
INDArray
public char ordering()
INDArray
public int[] shape()
INDArray
protected DataBuffer shapeOf()
public int[] stride()
INDArray
public int size(int dimension)
INDArray
protected void setShapeInformation(org.nd4j.linalg.primitives.Pair<DataBuffer,int[]> shapeInfo)
public INDArray broadcast(int... shape)
INDArray
public Object element()
INDArray
public IComplexNDArray rdiv(IComplexNumber n)
public IComplexNDArray rdivi(IComplexNumber n)
public IComplexNDArray rsub(IComplexNumber n)
public IComplexNDArray rsubi(IComplexNumber n)
public IComplexNDArray div(IComplexNumber n)
public IComplexNDArray divi(IComplexNumber n)
public IComplexNDArray mul(IComplexNumber n)
public IComplexNDArray muli(IComplexNumber n)
public IComplexNDArray sub(IComplexNumber n)
public IComplexNDArray subi(IComplexNumber n)
public IComplexNDArray add(IComplexNumber n)
public IComplexNDArray addi(IComplexNumber n)
public IComplexNDArray rdiv(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray rdivi(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray rsub(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray rsubi(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray div(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray divi(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray mul(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray muli(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray sub(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray subi(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray add(IComplexNumber n, IComplexNDArray result)
public IComplexNDArray addi(IComplexNumber n, IComplexNDArray result)
public boolean equalsWithEps(Object o, double eps)
INDArray
equalsWithEps
in interface INDArray
eps
- Epsilon value to use for the quality operationpublic INDArray unsafeDuplication()
INDArray
INDArray.dup()
unsafeDuplication
in interface INDArray
public INDArray remainder(INDArray denominator)
INDArray
public INDArray remainder(INDArray denominator, INDArray result)
INDArray
public INDArray remainder(Number denominator)
INDArray
public INDArray remainderi(INDArray denominator)
INDArray
remainderi
in interface INDArray
public INDArray remainderi(Number denominator)
INDArray
remainderi
in interface INDArray
public INDArray fmod(INDArray denominator)
INDArray
public INDArray fmod(INDArray denominator, INDArray result)
INDArray
public INDArray fmodi(INDArray denominator)
INDArray
public INDArray fmodi(Number denominator)
INDArray
public INDArray argMax(int... dimension)
INDArray
public boolean isAttached()
INDArray
isAttached
in interface INDArray
public boolean isInScope()
INDArray
public INDArray detach()
INDArray
public INDArray leverage()
INDArray
public INDArray leverageTo(String id)
INDArray
leverageTo
in interface INDArray
id
- ID of the workspace to leverage toINDArray.leverageTo(String, boolean)
public INDArray leverageTo(String id, boolean enforceExistence) throws Nd4jNoSuchWorkspaceException
INDArray
Nd4jNoSuchWorkspaceException
is thrown. Otherwise, if enforceExistance == false and no workspace with the specified ID exists, then the current
INDArray is returned unmodified (same as INDArray.leverage()
leverageTo
in interface INDArray
id
- ID of the workspace to leverage toenforceExistence
- If true, and the specified workspace does not exist: an Nd4jNoSuchWorkspaceException
will be thrown.Nd4jNoSuchWorkspaceException
INDArray.leverageTo(String)
public INDArray leverageOrDetach(String id)
INDArray
leverageOrDetach
in interface INDArray
id
- ID of the workspace to leverage toINDArray.leverageTo(String)
public INDArray migrate()
INDArray
migrate
in interface INDArray
INDArray.migrate(boolean)
public INDArray migrate(boolean detachIfNoWs)
INDArray
INDArray.migrate()
public INDArray sum(INDArray result, int... dimension)
INDArray
public INDArray mean(INDArray result, int... dimension)
INDArray
public INDArray amean(int... dimension)
INDArray
public Number ameanNumber()
INDArray
ameanNumber
in interface INDArray
public INDArray amax(int... dimension)
INDArray
public Number amaxNumber()
INDArray
amaxNumber
in interface INDArray
public INDArray amin(int... dimension)
INDArray
public Number aminNumber()
INDArray
aminNumber
in interface INDArray
public Number scan(Condition condition)
INDArray
public INDArray unsafeDuplication(boolean blocking)
INDArray
INDArray.dup()
unsafeDuplication
in interface INDArray
public Number entropyNumber()
entropyNumber
in interface INDArray
public Number shannonEntropyNumber()
shannonEntropyNumber
in interface INDArray
public Number logEntropyNumber()
logEntropyNumber
in interface INDArray
public INDArray entropy(int... dimension)
public INDArray shannonEntropy(int... dimension)
shannonEntropy
in interface INDArray
dimension
- public INDArray logEntropy(int... dimension)
logEntropy
in interface INDArray
dimension
- public Number percentileNumber(Number quantile)
INDArray
percentileNumber
in interface INDArray
quantile
- target percentile in range of 0..100public Number medianNumber()
INDArray
medianNumber
in interface INDArray
public INDArray median(int... dimension)
INDArray
public INDArray percentile(Number quantile, int... dimension)
INDArray
percentile
in interface INDArray
quantile
- target percentile in range of 0..100dimension
- Dimension to calculate percentile forCopyright © 2018. All rights reserved.