public final class StridedMatrix extends AStridedMatrix
data
cols, rows
Modifier and Type | Method and Description |
---|---|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
AVector |
asVector()
Returns the matrix values as a single reference Vector in the form [row0
row1 row2....]
|
Matrix |
clone()
Returns a clone of the array, as a new array which will be fully mutable
and may be of a different class to the original.
|
int |
columnStride() |
void |
copyColumnTo(int col,
double[] dest,
int destOffset) |
void |
copyRowTo(int row,
double[] dest,
int destOffset) |
static StridedMatrix |
create(AMatrix m) |
static StridedMatrix |
create(int rowCount,
int columnCount) |
AMatrix |
exactClone()
Returns an exact deep clone of an array (i.e.
|
double |
get(int row,
int column)
Returns a specified element in the matrix
|
int |
getArrayOffset() |
AStridedVector |
getColumn(int i)
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
|
AStridedVector |
getRow(int i)
Returns a row of the matrix as a vector view
|
AMatrix |
getTranspose()
Returns a transposed version of this matrix.
|
AMatrix |
getTransposeView()
Returns a transposed view of the array.
|
protected int |
index(int row,
int col)
Computes the index into the data array for a given position in the matrix
|
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 |
isPackedArray()
Returns true if the data array is fully packed by this matrix in row-major order
|
int |
rowStride() |
void |
set(int row,
int column,
double value)
Sets a specified element in the matrix
|
AStridedMatrix |
subMatrix(int rowStart,
int rowCount,
int colStart,
int colCount) |
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 StridedMatrix |
wrap(double[] data,
int rows,
int columns,
int offset,
int rowStride,
int columnStride) |
static StridedMatrix |
wrap(Matrix m) |
asDoubleArray, getStride, getStrides
getArray
columnCount, elementCount, getShape, getShape, getShapeClone, rowCount
abs, add, add, add, add, add, addAt, addMultiple, addRowMultiple, applyOp, asElementList, bandIndex, bandLength, bandLength, bandPosition, broadcast, broadcastCloneLike, broadcastLike, broadcastLike, calculateElement, calculateElement, clamp, cloneColumn, cloneRow, compose, composeWith, copyTo, determinant, dimensionality, divide, divide, elementDiv, elementIterator, elementMul, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equals, equalsTranspose, exp, fill, get, get, get, getBand, getBandWrapped, getLeadingDiagonal, getLongShape, getSlices, getSlices, getSliceViews, getTransposeCopy, hashCode, hasOrthonormalColumns, hasOrthonormalRows, immutable, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, innerProduct, inputDimensions, inverse, isBoolean, isDiagonal, isElementConstrained, isHermitian, isIdentity, isInvertible, isLowerTriangular, isOrthogonal, isPositiveDefinite, isRectangularDiagonal, isSameShape, isSameShape, isSquare, isSymmetric, isUpperTriangular, isView, isZero, iterator, join, log, lowerBandwidth, lowerBandwidthLimit, mul, multiply, multiply, multiplyRow, mutable, negate, nonZeroCount, outerProduct, outputDimensions, pow, reciprocal, replaceColumn, replaceRow, reshape, reshape, rotateView, scaleAdd, set, set, set, set, set, set, setColumn, setElements, setElements, setRow, signum, slice, slice, sliceCount, sqrt, square, sub, sub, sub, sub, sub, subArray, swapColumns, swapRows, toAffineTransform, toArray, toDoubleArray, toDoubleBuffer, toMatrix, toMatrixTranspose, toMutableMatrix, toString, toVector, trace, transform, transform, transform, transform, transformInPlace, transformInPlace, transposeInnerProduct, transposeInnerProduct, transposeInPlace, upperBandwidth, upperBandwidthLimit
density, elementMax, elementMin, scale, sparse
finalize, getClass, notify, notifyAll, wait, wait, wait
getArray, getShape
abs, add, add, applyOp, asElementList, broadcast, broadcastCloneLike, broadcastLike, clamp, copyTo, dimensionality, divide, divide, elementCount, elementIterator, elementMax, elementMin, elementSquaredSum, elementSum, ensureMutable, epsilonEquals, epsilonEquals, equals, exp, fill, get, get, get, getLongShape, getShape, getShapeClone, getSlices, getSlices, getSliceViews, getTransposeCopy, immutable, innerProduct, isBoolean, isElementConstrained, isSameShape, isView, isZero, join, log, multiply, multiply, mutable, negate, nonZeroCount, outerProduct, pow, reciprocal, reshape, rotateView, scale, scaleAdd, set, set, set, set, set, setElements, setElements, signum, slice, slice, sliceCount, sparse, sqrt, square, sub, sub, subArray, toArray, toDoubleArray, toDoubleBuffer, toVector
public static StridedMatrix create(int rowCount, int columnCount)
public boolean isFullyMutable()
INDArray
isFullyMutable
in interface INDArray
isFullyMutable
in class AMatrix
public boolean isMutable()
INDArray
public AStridedVector getRow(int i)
AMatrix
getRow
in class AStridedMatrix
public AStridedVector getColumn(int i)
AMatrix
getColumn
in class AStridedMatrix
public void copyRowTo(int row, double[] dest, int destOffset)
copyRowTo
in class AStridedMatrix
public void copyColumnTo(int col, double[] dest, int destOffset)
copyColumnTo
in class AStridedMatrix
public int rowStride()
rowStride
in class AStridedMatrix
public int columnStride()
columnStride
in class AStridedMatrix
public int getArrayOffset()
getArrayOffset
in interface IStridedArray
getArrayOffset
in class AStridedMatrix
public boolean isPackedArray()
AArrayMatrix
isPackedArray
in interface IStridedArray
isPackedArray
in class AStridedMatrix
public AStridedMatrix subMatrix(int rowStart, int rowCount, int colStart, int colCount)
subMatrix
in class AStridedMatrix
public void applyOp(Op op)
INDArray
public void getElements(double[] dest, int destOffset)
INDArray
getElements
in interface INDArray
getElements
in class AMatrix
public AMatrix getTranspose()
AMatrix
getTranspose
in interface INDArray
getTranspose
in class AMatrix
public AMatrix getTransposeView()
INDArray
getTransposeView
in interface INDArray
getTransposeView
in class AStridedMatrix
public double get(int row, int column)
AMatrix
public double unsafeGet(int row, int column)
AMatrix
unsafeGet
in class AArrayMatrix
public AVector asVector()
AMatrix
public void set(int row, int column, double value)
AMatrix
public void unsafeSet(int row, int column, double value)
AMatrix
unsafeSet
in class AArrayMatrix
public AMatrix exactClone()
INDArray
exactClone
in interface INDArray
exactClone
in class AMatrix
public static StridedMatrix create(AMatrix m)
public static StridedMatrix wrap(Matrix m)
public static StridedMatrix wrap(double[] data, int rows, int columns, int offset, int rowStride, int columnStride)
public void validate()
INDArray
protected final int index(int row, int col)
AArrayMatrix
index
in class AArrayMatrix
Copyright © 2014. All Rights Reserved.