public final class ZeroMatrix extends ARectangularMatrix implements IFastRows, IFastColumns, ISparse
cols, rows| Modifier and Type | Method and Description |
|---|---|
AMatrix |
addCopy(AMatrix a)
Adds another matrix to this matrix, returning a new matrix
|
void |
addToArray(double[] dest,
int offset)
Adds all the elements of this array to a double array, in row-major order
|
AVector |
asVector()
Returns the matrix values as a single reference Vector in the form [row0
row1 row2....]
|
AMatrix |
clone()
Returns a clone of the array data, as a new array which will be fully mutable
and may be of a different class to the original.
|
void |
copyColumnTo(int col,
double[] dest,
int destOffset)
Copies the elements in a selected row of this matrix to a double array
|
void |
copyRowTo(int row,
double[] dest,
int destOffset)
Copies the elements in a slected row of this matrix to a double array
|
static ZeroMatrix |
create(int rows,
int columns)
Create a ZeroMatrix of the specified size
|
double |
determinant()
Calculates the determinant of the matrix.
|
double |
diagonalProduct()
Computes the product of entries on the main diagonal of a matrix
|
double |
elementAbsPowSum(double p)
Returns the sum of the absolute values of all the elements raised to a specified power
|
Iterator<Double> |
elementIterator()
Returns an iterator over all elements in this array, in row-major order
|
double |
elementMax()
Returns the maximum element value in this array.
|
double |
elementMin()
Returns the maximum element value in this array.
|
double |
elementPowSum(double p)
Returns the sum of all the elements raised to a specified power
|
double |
elementSum()
Returns the sum of all elements in this matrix
|
boolean |
equals(AMatrix m)
Returns true if this matrix is exactly equal to another matrix
|
boolean |
equalsArray(double[] data,
int offset)
Returns true if the elements in this array exactly match the elements in the given array, in
row-major order
|
ZeroMatrix |
exactClone()
Creates a deep clone of an array, using the same class implementation as the original array
|
double |
get(int i,
int j)
Returns the double value at the specified position in a 2D matrix
|
AVector |
getBand(int band)
Gets a specific band of the matrix, as a view vector.
|
AVector |
getColumnClone(int col)
Returns a column of the matrix as a new cloned, mutable vector
The cloned column may be modified without affecting the original matrix.
|
AVector |
getColumnView(int col)
Returns a column of the matrix as a vector view.
|
void |
getElements(double[] dest,
int destOffset)
Gets all elements of the array, copying them into a double array at the specified offset
|
AVector |
getLeadingDiagonal()
Returns a vector view of the leading diagonal values of the matrix
|
AVector |
getRowClone(int row)
Returns a row of the matrix as a new cloned, mutable vector.
|
AVector |
getRowView(int row)
Returns a row of the matrix as a vector view.
|
ZeroMatrix |
getTranspose()
Returns the transpose of this array.
|
ZeroMatrix |
getTransposeView()
Returns a transposed view of the array.
|
int |
hashCode() |
boolean |
hasUncountable()
Checks to see if any element in the matrix is NaN of Infinite.
|
AMatrix |
innerProduct(AMatrix m)
Computes the inner product of this matrix with another.
|
boolean |
isBoolean()
Returns true if the array is boolean (contains only 0.0 or 1.0 values)
|
boolean |
isDiagonal()
Returns true iff this matrix is a square diagonal matrix
|
boolean |
isFullyMutable()
If this method returns true, the INDArray is guaranteed to be fully mutable
in all positions i.e.
|
boolean |
isInvertible()
Checks if this is an invertible matrix (i.e.
|
boolean |
isLowerTriangular()
Returns true if a matrix is lower triangular.
|
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 |
isSymmetric()
Returns true if a matrix is symmetric
|
boolean |
isUpperTriangular()
Returns true if a matrix is upper triangular
An upper triangular matrix is defined as having all elements equal to 0.0 where i > j
|
boolean |
isZero()
Returns true if the matrix is the zero matrix (all components zero)
|
int |
lowerBandwidthLimit()
A limit on the lower bandwidth of the banded matrix.
|
void |
multiply(AMatrix m)
Multiplies this matrix in-place by another in an entrywise manner (Hadamard product).
|
ZeroMatrix |
multiplyCopy(double a)
Returns a copy of the array with all elements multiplied by a single constant value
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
int |
rank()
Calculate the rank of a matrix.
|
double |
reduce(Op2 op)
Reduces over all elements of the array in row-major order.
|
double |
reduce(Op2 op,
double init)
Reduces over all elements of the array in row-major order.
|
double |
rowDotProduct(int i,
AVector v)
Returns the dot product of a specific row with a vector.
|
void |
set(int row,
int column,
double value)
Sets a value at a given position in a mutable 2D array
|
AMatrix |
sparseClone()
Creates a fully mutable clone of this array.
|
AMatrix |
subMatrix(int rowStart,
int rows,
int colStart,
int cols)
Gets a rectangular submatrix view of part of a matrix
|
double[] |
toDoubleArray()
Copies the elements of this array to a new double[] array.
|
Matrix |
toMatrix()
Coerces the matrix to the standard mutable Matrix type
in row major order.
|
Matrix |
toMatrixTranspose()
Coerces the transpose of a matrix to the standard mutable Matrix type
in row major order.
|
double |
trace()
Computes the trace of a matrix, i.e.
|
void |
transform(AVector input,
AVector output)
Transforms a source vector into a destination vector, using matrix multiplication (inner product).
|
void |
transform(Vector input,
Vector output) |
double |
unsafeGet(int row,
int column)
Gets an element in the matrix in an unsafe fashion, without performing bound checks
The result is undefined if the row and column are out of bounds.
|
void |
unsafeSet(int row,
int column,
double value)
Sets an element value in the matrix in an unsafe fashion, without performing bound checks
The result is undefined if the row and column are out of bounds.
|
int |
upperBandwidthLimit()
A limit on the upper bandwidth of the banded matrix.
|
bandLength, checkColumn, checkIndex, checkRow, checkSameShape, checkSameShape, checkSquare, columnCount, elementCount, getShape, getShape, getShapeClone, isSameShape, isSameShape, isSameShape, isSquare, rowCountabs, add, add, add, add, add2, addAt, addCopy, addCopy, addCopy, addCopy, addInnerProduct, addInnerProduct, addInnerProduct, addMultiple, addMultiple, addMultiple, addOuterProduct, addOuterProduct, addRowMultiple, applyOp, applyOp, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, bandIndex, bandLength, bandPosition, bandStartColumn, bandStartRow, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, checkColumnCount, checkDimension, checkRowCount, checkShape, clamp, composeWith, copy, dense, denseClone, dimensionality, divide, divide, divide, divide, elementsEqual, elementSquaredSum, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equalsByRows, equalsTranspose, exp, fill, get, get, get, getBandWrapped, getColumn, getColumns, getLongShape, getRow, getRows, getSlices, getSlices, getSliceViews, getTransposeCopy, hasOrthonormalColumns, hasOrthonormalRows, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, inverse, isElementConstrained, isHermitian, isIdentity, isOrthogonal, isOrthogonal, isPositiveDefinite, isRectangularDiagonal, isView, iterator, join, log, lowerBandwidth, mul, multiply, multiply, multiply, multiplyRow, mutable, negate, outerProduct, outputDimensions, pow, reciprocal, reduceSlices, reduceSlices, reorder, reorder, replaceColumn, replaceRow, reshape, reshape, rotateView, scaleAdd, scaleAdd, set, set, set, set, set, set, set, set, setColumn, setElements, setElements, setRow, signum, slice, slice, sliceCount, sparse, sqrt, square, sub, sub, sub, subArray, swapColumns, swapRows, toAffineTransform, toArray, toDoubleBuffer, toMutableMatrix, toNestedDoubleArrays, toSliceArray, toString, toStringFull, toVector, transformInPlace, transformInPlace, transposeInnerProduct, transposeInnerProduct, transposeInPlace, upperBandwidth, validateabsCopy, add, addAt, addInnerProduct, addPower, addPower, broadcastLike, checkMutable, componentCount, density, divideCopy, elementProduct, equals, equalsArray, get, get, get, get, get, getComponent, 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, waitgetColumnadd2, addAt, addCopy, columnCount, getColumns, getRows, innerProduct, innerProduct, inverse, isIdentity, isRectangularDiagonal, isSquare, rowCount, toNestedDoubleArrays, transformInPlace, transposeInPlaceabs, absCopy, add, add, addAt, addCopy, addCopy, addInnerProduct, addMultiple, addOuterProduct, addPower, addPower, applyOp, applyOp, applyOp, applyOp, applyOpCopy, asDoubleArray, asElementList, broadcast, broadcastCloneLike, broadcastCopyLike, broadcastLike, broadcastLike, broadcastLike, checkMutable, clamp, componentCount, copy, dense, denseClone, dimensionality, divide, divide, divideCopy, elementCount, elementProduct, elementsEqual, elementSquaredSum, ensureMutable, epsilonEquals, epsilonEquals, equals, equalsArray, exp, fill, get, get, get, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, getLongShape, getShape, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTransposeCopy, immutable, innerProduct, innerProduct, innerProduct, isDense, isElementConstrained, isSameShape, isView, join, join, log, multiply, multiply, multiplyCopy, mutable, negate, negateCopy, outerProduct, pow, reciprocal, reciprocalCopy, reduceSlices, reduceSlices, reorder, reorder, reshape, rotateView, scale, scaleAdd, scaleAdd, scaleCopy, set, set, set, set, set, set, setElements, setElements, setElements, setInnerProduct, setMultiple, setMultiple, signum, signumCopy, slice, slice, sliceCount, sliceValue, sparse, sqrt, square, squareCopy, sub, sub, subArray, subCopy, toArray, toDoubleBuffer, toSliceArray, toVector, validate, withComponentsforEach, spliteratorpublic boolean isFullyMutable()
INDArrayisFullyMutable in interface INDArrayisFullyMutable in class AMatrixpublic static ZeroMatrix create(int rows, int columns)
rows - columns - public boolean isSparse()
INDArrayisSparse in interface INDArrayisSparse in class AbstractArray<AVector>public boolean isMutable()
INDArraypublic boolean isSymmetric()
AMatrixisSymmetric in interface IMatrixisSymmetric in class AMatrixpublic boolean isDiagonal()
IMatrixisDiagonal in interface IMatrixisDiagonal in class AMatrixpublic boolean isUpperTriangular()
AMatrixisUpperTriangular in class AMatrixpublic boolean isLowerTriangular()
AMatrixisLowerTriangular in class AMatrixpublic boolean isBoolean()
INDArraypublic int upperBandwidthLimit()
AMatrixupperBandwidthLimit in class AMatrixpublic int lowerBandwidthLimit()
AMatrixlowerBandwidthLimit in class AMatrixpublic AVector getRowView(int row)
IMatrixgetRowView in interface IMatrixgetRowView in class AMatrixpublic AVector getColumnView(int col)
IMatrixgetColumnView in interface IMatrixgetColumnView in class AMatrixpublic AVector getRowClone(int row)
IMatrixgetRowClone in interface IMatrixgetRowClone in class AMatrixpublic AVector getColumnClone(int col)
IMatrixgetColumnClone in interface IMatrixgetColumnClone in class AMatrixpublic void copyRowTo(int row,
double[] dest,
int destOffset)
AMatrixpublic void copyColumnTo(int col,
double[] dest,
int destOffset)
AMatrixcopyColumnTo in class AMatrixdest - Destination double[] arraypublic void addToArray(double[] dest,
int offset)
INDArrayaddToArray in interface INDArrayaddToArray in class AMatrixpublic double reduce(Op2 op, double init)
INDArraypublic double reduce(Op2 op)
INDArraypublic AMatrix addCopy(AMatrix a)
IMatrixpublic void getElements(double[] dest,
int destOffset)
INDArraygetElements in interface INDArraygetElements in class AMatrixpublic double determinant()
AMatrixdeterminant in class AMatrixpublic int rank()
AMatrixpublic double trace()
IMatrixpublic double diagonalProduct()
AMatrixdiagonalProduct in interface IMatrixdiagonalProduct in class AMatrixpublic double rowDotProduct(int i,
AVector v)
AMatrixrowDotProduct in class AMatrixpublic double get(int i,
int j)
INDArraypublic void set(int row,
int column,
double value)
INDArraypublic double unsafeGet(int row,
int column)
AMatrixpublic void unsafeSet(int row,
int column,
double value)
AMatrixpublic AMatrix clone()
INDArraypublic boolean isZero()
AMatrixpublic double elementSum()
AMatrixelementSum in interface INDArrayelementSum in class AMatrixpublic double elementMax()
INDArrayelementMax in interface INDArrayelementMax in class AbstractArray<AVector>public double elementMin()
INDArrayelementMin in interface INDArrayelementMin in class AbstractArray<AVector>public long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AMatrixpublic void transform(AVector input, AVector output)
IMatrixpublic boolean isInvertible()
IMatrixisInvertible in interface IMatrixisInvertible in class AMatrixpublic AVector asVector()
AMatrixpublic AMatrix innerProduct(AMatrix m)
IMatrixinnerProduct in interface IMatrixinnerProduct in class AMatrixpublic ZeroMatrix multiplyCopy(double a)
INDArraymultiplyCopy in interface INDArraymultiplyCopy in class AMatrixa - A scalar factorpublic void multiply(AMatrix m)
AMatrixpublic boolean equals(AMatrix m)
AMatrixpublic boolean equalsArray(double[] data,
int offset)
INDArrayequalsArray in interface INDArrayequalsArray in class AMatrixdata - Array of double element values to check for equalityoffset - Offset into the data arraypublic ZeroMatrix getTranspose()
INDArraygetTranspose in interface INDArraygetTranspose in interface IMatrixgetTranspose in class AMatrixpublic ZeroMatrix getTransposeView()
INDArraygetTransposeView in interface INDArraygetTransposeView in interface IMatrixgetTransposeView in class AMatrixpublic Matrix toMatrix()
AMatrixpublic double[] toDoubleArray()
INDArraytoDoubleArray in interface INDArraytoDoubleArray in class AMatrixpublic AMatrix sparseClone()
INDArraysparseClone in interface INDArraysparseClone in class AMatrixpublic Matrix toMatrixTranspose()
AMatrixtoMatrixTranspose in class AMatrixpublic AVector getLeadingDiagonal()
AMatrixgetLeadingDiagonal in class AMatrixpublic AVector getBand(int band)
AMatrixpublic AMatrix subMatrix(int rowStart, int rows, int colStart, int cols)
IMatrixpublic Iterator<Double> elementIterator()
INDArrayelementIterator in interface INDArrayelementIterator in class AMatrixpublic ZeroMatrix exactClone()
INDArrayexactClone in interface INDArrayexactClone in class AMatrixpublic boolean hasUncountable()
AMatrixhasUncountable in interface INDArrayhasUncountable in class AMatrixpublic double elementPowSum(double p)
elementPowSum in interface INDArrayelementPowSum in class AbstractArray<AVector>public double elementAbsPowSum(double p)
elementAbsPowSum in interface INDArrayelementAbsPowSum in class AbstractArray<AVector>Copyright © 2016. All rights reserved.