public final class PermutationMatrix extends ABooleanMatrix implements ISparse
| Modifier and Type | Method and Description |
|---|---|
double |
calculateElement(int i,
AVector inputVector)
Calculates a single element of the output.
|
double |
calculateElement(int i,
Vector inputVector) |
int |
columnCount()
Returns the number of columns in the matrix
|
void |
copyColumnTo(int col,
double[] dest,
int destOffset) |
void |
copyRowTo(int row,
double[] dest,
int destOffset) |
static PermutationMatrix |
create(Index rowPermutations) |
static PermutationMatrix |
create(int... rowPermutations) |
static PermutationMatrix |
createIdentity(int length) |
static PermutationMatrix |
createRandomPermutation(int length) |
static PermutationMatrix |
createSwap(int i,
int j,
int length) |
double |
density()
Computes the density ratio of this sparse array (proportion of non-zero elements)
|
double |
determinant()
Calculates the determinant of the matrix.
|
double |
elementSquaredSum()
Returns the squared sum of all elements in the matrix
|
double |
elementSum()
Returns the sum of all elements in the matrix
|
PermutationMatrix |
exactClone()
Returns an exact deep clone of an array (i.e.
|
double |
get(int row,
int column)
Returns a specified element in the matrix
|
AxisVector |
getColumn(int j)
Returns a column of the matrix as a vector view
|
AxisVector |
getRow(int i)
Returns a row of the matrix as a vector view
|
PermutationMatrix |
getTranspose()
Returns a transposed version of this matrix.
|
boolean |
hasOrthonormalColumns() |
boolean |
hassOrthonormalRows() |
Matrix |
innerProduct(AMatrix a) |
Matrix |
innerProduct(Matrix a) |
PermutationMatrix |
inverse()
Return the inverse of this transformation if possible
|
boolean |
isDiagonal()
Returns true iff a matrix is a square diagonal matrix
|
boolean |
isIdentity()
Returns true if this transform is known to be the identity function, 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 |
isOrthogonal() |
boolean |
isSquare()
Returns true if the transform is square (same number of input and output dimensions)
|
boolean |
isSymmetric()
Returns true if a matrix is symmetric
|
boolean |
isUpperTriangular()
Returns true if a matrix is upper triangular
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
int |
rowCount()
Returns the number of rows in the matrix
|
void |
set(int row,
int column,
double value)
Sets a specified element in the matrix
|
void |
swapColumns(int i,
int j)
Swaps two columns of the matrix in place
|
void |
swapRows(int i,
int j)
Swaps two rows of the matrix in place
This is an elementary row operation
|
double |
trace() |
void |
transform(AVector source,
AVector dest)
Transforms the source vector, storing the result in the given destination vector
|
void |
transform(Vector source,
Vector dest) |
Matrix |
transposeInnerProduct(Matrix s) |
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.
|
void |
validate()
Validates the internal data structure of the INDArray.
|
static PermutationMatrix |
wrap(Index rowPermutations) |
isBoolean, isFullyMutableabs, add, add, add, add, add, addAt, addMultiple, addRowMultiple, applyOp, applyOp, asDoubleArray, asElementList, asVector, bandIndex, bandLength, bandLength, bandPosition, broadcast, broadcastCloneLike, broadcastLike, broadcastLike, clamp, clone, cloneRow, compose, compose, composeWith, composeWith, copyOfMatrix, copyOfTranslationVector, copyTo, dimensionality, divide, divide, elementCount, elementDiv, elementIterator, elementMul, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equals, exp, fill, get, get, get, getBand, getBandWrapped, getElements, getLeadingDiagonal, getLongShape, getMatrixComponent, getShape, getShape, getSlices, getSliceViews, getTransposeCopy, getTransposeView, hashCode, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, isElementConstrained, isHermitian, isInvertible, isPositiveDefinite, isRectangularDiagonal, isSameShape, isSameShape, isView, isZero, iterator, log, lowerBandwidth, lowerBandwidthLimit, mul, multiply, multiply, multiplyRow, negate, outerProduct, outputDimensions, pow, reciprocal, reshape, reshape, scale, scaleAdd, set, set, set, set, set, set, setColumn, setElements, setElements, setRow, signum, slice, slice, sliceCount, sqrt, square, sub, sub, sub, sub, sub, subMatrix, toAffineTransform, toArray, toDoubleArray, toDoubleBuffer, toMatrix, toMatrixTranspose, toMutableMatrix, toString, toVector, transform, transform, transformInPlace, transformInPlace, transposeInnerProduct, transposeInPlace, upperBandwidth, upperBandwidthLimitgetTranslationComponent, isLinearcompose, transformNormaltakeComponents, takeComponents, takeComponentspublic static PermutationMatrix createIdentity(int length)
public static PermutationMatrix createSwap(int i, int j, int length)
public static PermutationMatrix create(Index rowPermutations)
public static PermutationMatrix wrap(Index rowPermutations)
public static PermutationMatrix create(int... rowPermutations)
public static PermutationMatrix createRandomPermutation(int length)
public boolean isMutable()
INDArraypublic boolean isSymmetric()
AMatrixisSymmetric in class AMatrixpublic double determinant()
AMatrixdeterminant in class AMatrixpublic boolean isIdentity()
ATransformisIdentity in class AMatrixpublic boolean isOrthogonal()
isOrthogonal in class AMatrixpublic boolean hasOrthonormalColumns()
hasOrthonormalColumns in class AMatrixpublic boolean hassOrthonormalRows()
hassOrthonormalRows in class AMatrixpublic boolean isDiagonal()
AMatrixisDiagonal in class AMatrixpublic boolean isUpperTriangular()
AMatrixisUpperTriangular in class AMatrixpublic boolean isLowerTriangular()
AMatrixisLowerTriangular in class AMatrixpublic boolean isSquare()
ATransformpublic int rowCount()
AMatrixpublic int columnCount()
AMatrixcolumnCount in interface IMatrixcolumnCount in class AMatrixpublic double elementSum()
AMatrixelementSum in interface INDArrayelementSum in class AMatrixpublic double elementSquaredSum()
AMatrixelementSquaredSum in interface INDArrayelementSquaredSum in class AMatrixpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AMatrixpublic PermutationMatrix inverse()
ATransformpublic PermutationMatrix getTranspose()
AMatrixgetTranspose in interface INDArraygetTranspose in class AMatrixpublic double get(int row,
int column)
AMatrixpublic void unsafeSet(int row,
int column,
double value)
AMatrixpublic double unsafeGet(int row,
int column)
AMatrixpublic void set(int row,
int column,
double value)
AMatrixpublic AxisVector getRow(int i)
AMatrixpublic AxisVector getColumn(int j)
AMatrixpublic void copyRowTo(int row,
double[] dest,
int destOffset)
public void copyColumnTo(int col,
double[] dest,
int destOffset)
copyColumnTo in class AMatrixpublic void swapRows(int i,
int j)
AMatrixpublic void swapColumns(int i,
int j)
AMatrixswapColumns in class AMatrixpublic void transform(AVector source, AVector dest)
ATransformtransform in interface ITransformtransform in class AMatrixpublic double calculateElement(int i,
AVector inputVector)
ATransformcalculateElement in class AMatrixpublic double calculateElement(int i,
Vector inputVector)
calculateElement in class AMatrixpublic Matrix innerProduct(AMatrix a)
innerProduct in class AMatrixpublic Matrix innerProduct(Matrix a)
innerProduct in class AMatrixpublic Matrix transposeInnerProduct(Matrix s)
transposeInnerProduct in class AMatrixpublic void validate()
INDArraypublic double density()
ISparsepublic PermutationMatrix exactClone()
INDArrayexactClone in interface INDArrayexactClone in class AMatrixCopyright © 2013. All Rights Reserved.