public abstract class ASparseRCMatrix extends ARectangularMatrix
| Modifier and Type | Field and Description |
|---|---|
protected AVector[] |
data |
cols, rows| Modifier | Constructor and Description |
|---|---|
protected |
ASparseRCMatrix(int rows,
int cols,
AVector[] data) |
| Modifier and Type | Method and Description |
|---|---|
void |
abs()
Replaces all elements of this array with their absolute values, according to Math.abs(double)
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
abstract int |
componentCount()
Returns the number of components of this array.
|
void |
copyColumnTo(int j,
double[] dest,
int destOffset)
Copies the elements in a selected row of this matrix to a double array
|
void |
copyRowTo(int i,
double[] dest,
int destOffset)
Copies the elements in a slected row of this matrix to a double array
|
Matrix |
dense()
Coerces this INDArray to a dense format, without changing its element values.
|
double |
elementMax()
Returns the maximum element value in this array.
|
double |
elementMin()
Returns the maximum element value in this array.
|
double |
elementSquaredSum()
Returns the squared sum of all elements in this matrix
|
double |
elementSum()
Returns the sum of all elements in this matrix
|
void |
exp()
Computes the function e^x (in-place) for all array elements
|
void |
fill(double value)
Fills this array with a single double value.
|
AVector |
getColumnClone(int column)
Returns a column of the matrix as a new cloned, mutable vector
The cloned column may be modified without affecting the original matrix.
|
abstract AVector |
getComponent(int k)
Gets a component from the array at the specified index
Will throw an error if components are not supported, or if the component is out of bounds as defined by 0 <= k |
List<AVector> |
getRotatedData(int outerLen,
int innerLen) |
AVector |
getRowClone(int row)
Returns a row of the matrix as a new cloned, mutable vector.
|
boolean |
isFullyMutable()
If this method returns true, the INDArray is guaranteed to be fully mutable
in all positions i.e.
|
boolean |
isMutable()
Returns true if the INDArray is mutable (at least partially)
|
boolean |
isSparse()
Returns true if the array is in a sparse format
|
boolean |
isZero()
Returns true if the matrix is the zero matrix (all components zero)
|
protected abstract int |
lineLength() |
void |
log()
Computes the natural logarithm (in-place) for all array elements
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
void |
pow(double exponent)
Raises all elements of the array to a specified power in place
|
void |
reciprocal()
Replaces all elements in the array with their reciprocal
|
AMatrix |
sparse()
Coerces this INDArray to a sparse format, without changing its element values.
|
void |
sqrt()
Computes the square root of all elements in the array
|
void |
square()
Squares all elements of the array in place
|
double[] |
toDoubleArray()
Copies the elements of this array to a new double[] array.
|
AVector |
unsafeGetVector(int i)
Gets a vector from the internal data array
The vector may be null (indicating a zero row or column)
|
protected void |
unsafeSetVec(int i,
AVector vec) |
void |
validate()
Validates the internal data structure of the INDArray.
|
bandLength, checkColumn, checkIndex, checkRow, checkSameShape, checkSameShape, checkSquare, columnCount, elementCount, getShape, getShape, getShapeClone, isSameShape, isSameShape, isSameShape, isSquare, rowCountadd, add, add, add, add2, addAt, addCopy, addCopy, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addOuterProduct, addOuterProduct, addRowMultiple, addToArray, applyOp, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, asVector, bandIndex, bandLength, bandPosition, bandStartColumn, bandStartRow, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, checkColumnCount, checkDimension, checkRowCount, checkShape, clamp, clone, composeWith, copy, denseClone, determinant, diagonalProduct, dimensionality, divide, divide, divide, divide, elementIterator, elementsEqual, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equalsArray, equalsByRows, equalsTranspose, exactClone, get, get, get, get, getBand, getBandWrapped, getColumn, getColumns, getColumnView, getElements, getLeadingDiagonal, getLongShape, getRow, getRows, getRowView, getSlices, getSlices, getSliceViews, getTranspose, getTransposeCopy, getTransposeView, hashCode, hasOrthonormalColumns, hasOrthonormalRows, hasUncountable, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, inverse, isBoolean, isDiagonal, isElementConstrained, isHermitian, isIdentity, isInvertible, isLowerTriangular, isOrthogonal, isOrthogonal, isPositiveDefinite, isRectangularDiagonal, isSymmetric, isUpperTriangular, isView, iterator, join, lowerBandwidth, lowerBandwidthLimit, mul, multiply, multiply, multiply, multiply, multiplyCopy, multiplyRow, mutable, negate, outerProduct, outputDimensions, rank, reduce, reduce, reduceSlices, reduceSlices, reorder, reorder, replaceColumn, replaceRow, reshape, reshape, rotateView, rowDotProduct, scaleAdd, scaleAdd, set, set, set, set, set, set, set, set, set, setColumn, setElements, setElements, setRow, signum, slice, slice, sliceCount, sparseClone, sub, sub, sub, subArray, subMatrix, swapColumns, swapRows, toAffineTransform, toArray, toDoubleBuffer, toMatrix, toMatrixTranspose, toMutableMatrix, toNestedDoubleArrays, toSliceArray, toString, toStringFull, toVector, trace, transform, transform, transformInPlace, transformInPlace, transposeInnerProduct, transposeInnerProduct, transposeInPlace, unsafeGet, unsafeSet, upperBandwidth, upperBandwidthLimitabsCopy, add, addAt, addInnerProduct, addPower, addPower, broadcastLike, checkMutable, density, divideCopy, elementAbsPowSum, elementPowSum, elementProduct, equals, equalsArray, get, get, get, get, get, getComponents, getElements, getElements, getElements, isDense, join, multiplyCopy, negateCopy, reciprocalCopy, scale, scaleCopy, setElements, setInnerProduct, setMultiple, setMultiple, signumCopy, sliceValue, squareCopy, sub, sub, subCopy, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitabsCopy, addAt, addPower, addPower, broadcastLike, checkMutable, divideCopy, elementAbsPowSum, elementPowSum, elementProduct, equalsArray, get, get, get, get, get, getComponents, getElements, getElements, getElements, isDense, join, multiplyCopy, negateCopy, reciprocalCopy, scale, scaleCopy, setElements, setInnerProduct, setMultiple, setMultiple, signumCopy, sliceValue, squareCopy, sub, subCopy, withComponentsforEach, spliteratorprotected final AVector[] data
protected ASparseRCMatrix(int rows,
int cols,
AVector[] data)
protected void unsafeSetVec(int i,
AVector vec)
public AVector unsafeGetVector(int i)
public boolean isSparse()
INDArrayisSparse in interface INDArrayisSparse in class AbstractArray<AVector>public void fill(double value)
INDArraypublic void reciprocal()
INDArrayreciprocal in interface INDArrayreciprocal in class AMatrixpublic void abs()
INDArraypublic void pow(double exponent)
INDArraypublic void square()
INDArraypublic void sqrt()
INDArraypublic void exp()
INDArraypublic void log()
INDArraypublic final boolean isMutable()
INDArraypublic final boolean isFullyMutable()
INDArrayisFullyMutable in interface INDArrayisFullyMutable in class AMatrixpublic final boolean isZero()
AMatrixpublic AVector getRowClone(int row)
IMatrixgetRowClone in interface IMatrixgetRowClone in class AMatrixpublic AVector getColumnClone(int column)
IMatrixgetColumnClone in interface IMatrixgetColumnClone in class AMatrixpublic void copyRowTo(int i,
double[] dest,
int destOffset)
AMatrixpublic void copyColumnTo(int j,
double[] dest,
int destOffset)
AMatrixcopyColumnTo in class AMatrixdest - Destination double[] arraypublic double elementSum()
AMatrixelementSum in interface INDArrayelementSum in class AMatrixpublic double elementSquaredSum()
AMatrixelementSquaredSum in interface INDArrayelementSquaredSum in class AMatrixpublic double elementMin()
INDArrayelementMin in interface INDArrayelementMin in class AbstractArray<AVector>public double elementMax()
INDArrayelementMax in interface INDArrayelementMax in class AbstractArray<AVector>public void applyOp(Op op)
INDArraypublic final long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AMatrixpublic double[] toDoubleArray()
INDArraytoDoubleArray in interface INDArraytoDoubleArray in class AMatrixpublic Matrix dense()
INDArraypublic AMatrix sparse()
INDArraypublic abstract int componentCount()
INDArraycomponentCount in interface INDArraycomponentCount in class AbstractArray<AVector>public abstract AVector getComponent(int k)
INDArraygetComponent in interface INDArraygetComponent in class AbstractArray<AVector>protected abstract int lineLength()
public void validate()
INDArrayCopyright © 2016. All rights reserved.