public final class Matrix extends ArrayMatrix
cols, data, rows| Constructor and Description |
|---|
Matrix(AMatrix m) |
Matrix(int rowCount,
int columnCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(AMatrix m)
Adds another matrix to this matrix.
|
void |
add(Matrix m) |
void |
addMultiple(AMatrix m,
double factor) |
void |
addMultiple(Matrix m,
double factor) |
void |
addRowMultiple(int src,
int dst,
double factor)
Adds a multiple of a source row to a destination row
This is an elementary row operation
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
Vector |
asVector()
Returns the matrix values as a single reference Vector in the form [row0
row1 row2....]
|
void |
clamp(double min,
double max) |
Matrix |
clone()
Clones the transform, performing a deep copy where needed
|
int |
columnCount()
Returns the number of columns in the matrix
|
static Matrix |
create(AMatrix m) |
static Matrix |
create(int rowCount,
int columnCount) |
Matrix |
create(Object... rowVectors) |
double |
elementSum()
Returns the sum of all elements in the matrix
|
Matrix |
exactClone()
Returns an exact deep clone of an array (i.e.
|
double |
get(int row,
int column)
Returns a specified element in the matrix
|
StridedVector |
getColumn(int row)
Returns a column of the matrix as a vector view
|
void |
getElements(double[] dest,
int offset)
Gets all elements of the array, copying them into a double array
|
ArraySubVector |
getRow(int row)
Returns a row of the matrix as a vector view
|
StridedMatrix |
getTranspose()
Returns a transposed version of this matrix.
|
StridedMatrix |
getTransposeView()
Returns a transposed view of the array.
|
Matrix |
innerProduct(AMatrix a) |
AVector |
innerProduct(AVector a) |
Matrix |
innerProduct(Matrix a) |
Vector |
innerProduct(Vector a) |
boolean |
isPackedArray() |
boolean |
isView()
Return true if this is a view
|
void |
multiply(double factor)
Multiplies all elements of the array by a given double value
|
void |
multiplyRow(int i,
double factor)
Multiplies a row by a constant factor
This is an elementary row operation
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
void |
reciprocal()
Replaces all elements in the array with their reciprocal
|
int |
rowCount()
Returns the number of rows in the matrix
|
void |
set(AMatrix a) |
void |
set(double value)
Sets all elements of an array to a specific double value
|
void |
set(int row,
int column,
double value)
Sets a specified element in the matrix
|
void |
setColumn(int j,
AVector col) |
void |
setRow(int i,
AVector row) |
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
|
void |
toDoubleBuffer(DoubleBuffer dest)
Copies the elements of this INDArray to the specified double buffer
|
void |
transform(AVector source,
AVector dest)
Transforms the source vector, storing the result in the given destination vector
|
static Matrix |
wrap(int rowCount,
int columnCount,
double[] data) |
abs, add, add, add, addAt, applyOp, asElementList, broadcast, calculateElement, cloneRow, compose, compose, composeWith, composeWith, copyOfMatrix, copyOfTranslationVector, copyTo, determinant, dimensionality, elementCount, elementIterator, elementMul, elementSquaredSum, epsilonEquals, epsilonEquals, epsilonEquals, equals, equals, equals, equals, exp, fill, get, get, get, getLeadingDiagonal, getLongShape, getMatrixComponent, getShape, getShape, getSlices, getSliceViews, hashCode, hasOrthonormalColumns, hassOrthonormalRows, innerProduct, innerProduct, inputDimensions, inverse, isDiagonal, isElementConstrained, isFullyMutable, isHermitian, isIdentity, isInvertible, isLowerTriangular, isMutable, isOrthogonal, isPositiveDefinite, isRectangularDiagonal, isSquare, isSymmetric, isUpperTriangular, isZeroMatrix, iterator, log, mul, multiply, negate, outerProduct, outputDimensions, pow, reshape, scale, scaleAdd, set, set, set, set, setElements, setElements, signum, slice, slice, sliceCount, sqrt, square, sub, sub, sub, sub, toAffineTransform, toMatrix, toMutableMatrix, toString, toVector, trace, transformInPlace, transformInPlace, transposeInPlace, validategetTranslationComponent, isLinearcompose, transformNormaltakeComponents, takeComponents, takeComponents, transformpublic Matrix(int rowCount,
int columnCount)
public Matrix(AMatrix m)
public static Matrix create(int rowCount, int columnCount)
public boolean isView()
INDArraypublic boolean isPackedArray()
isPackedArray in class ArrayMatrixpublic static Matrix wrap(int rowCount, int columnCount, double[] data)
public AVector innerProduct(AVector a)
innerProduct in class AMatrixpublic Matrix innerProduct(Matrix a)
innerProduct in class AMatrixpublic Matrix innerProduct(AMatrix a)
innerProduct in class AMatrixpublic double elementSum()
AMatrixelementSum in interface INDArrayelementSum in class AMatrixpublic long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AMatrixpublic Matrix clone()
ATransformpublic void transform(AVector source, AVector dest)
ATransformtransform in interface ITransformtransform in class AMatrixpublic ArraySubVector getRow(int row)
AMatrixpublic StridedVector getColumn(int row)
AMatrixpublic int rowCount()
AMatrixpublic int columnCount()
AMatrixcolumnCount in interface IMatrixcolumnCount in class AMatrixpublic void swapRows(int i,
int j)
AMatrixpublic void swapColumns(int i,
int j)
AMatrixswapColumns in class AMatrixpublic void multiplyRow(int i,
double factor)
AMatrixmultiplyRow in class AMatrixpublic void addRowMultiple(int src,
int dst,
double factor)
AMatrixaddRowMultiple in class AMatrixpublic Vector asVector()
AMatrixpublic void toDoubleBuffer(DoubleBuffer dest)
INDArraytoDoubleBuffer in interface INDArraytoDoubleBuffer in class AMatrixpublic double get(int row,
int column)
AMatrixpublic void set(int row,
int column,
double value)
AMatrixpublic void applyOp(Op op)
INDArraypublic void addMultiple(Matrix m, double factor)
public void add(Matrix m)
public void addMultiple(AMatrix m, double factor)
addMultiple in class AMatrixpublic void add(AMatrix m)
AMatrixpublic void multiply(double factor)
INDArraypublic void getElements(double[] dest,
int offset)
INDArraygetElements in interface INDArraygetElements in class AMatrixpublic StridedMatrix getTranspose()
AMatrixgetTranspose in interface INDArraygetTranspose in class AMatrixpublic StridedMatrix getTransposeView()
INDArraygetTransposeView in interface INDArraygetTransposeView in class AMatrixpublic void set(double value)
INDArraypublic void reciprocal()
INDArrayreciprocal in interface INDArrayreciprocal in class AMatrixpublic void clamp(double min,
double max)
public Matrix exactClone()
INDArrayexactClone in interface INDArrayexactClone in class AMatrixCopyright © 2013. All Rights Reserved.