Package org.ejml.data
Interface Matrix
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
CMatrix
,DMatrix
,DMatrixFixed
,DMatrixSparse
,FMatrix
,FMatrixFixed
,FMatrixSparse
,MatrixSparse
,ReshapeMatrix
,ZMatrix
- All Known Implementing Classes:
BMatrixRMaj
,CMatrixD1
,CMatrixRMaj
,DMatrix1Row
,DMatrix2
,DMatrix2x2
,DMatrix3
,DMatrix3x3
,DMatrix4
,DMatrix4x4
,DMatrix5
,DMatrix5x5
,DMatrix6
,DMatrix6x6
,DMatrixD1
,DMatrixRBlock
,DMatrixRMaj
,DMatrixSparseCSC
,DMatrixSparseTriplet
,FMatrix1Row
,FMatrix2
,FMatrix2x2
,FMatrix3
,FMatrix3x3
,FMatrix4
,FMatrix4x4
,FMatrix5
,FMatrix5x5
,FMatrix6
,FMatrix6x6
,FMatrixD1
,FMatrixRBlock
,FMatrixRMaj
,FMatrixSparseCSC
,FMatrixSparseTriplet
,ZMatrixD1
,ZMatrixRMaj
Base interface for all rectangular matrices
-
Method Summary
Modifier and TypeMethodDescription<T extends Matrix>
Tcopy()
Creates an exact copy of the matrix<T extends Matrix>
Tcreate
(int numRows, int numCols) Creates a new matrix of the same type with the specified shape<T extends Matrix>
TCreates a new matrix with the same shape as this matrixint
Returns the number of columns in this matrix.int
Returns the number of rows in this matrix.getType()
Returns the type of matrixvoid
print()
Prints the matrix to standard out using standard formatting.void
Prints the matrix to standard out with the specified formatting.void
Sets this matrix to be identical to the 'original' matrix passed in.void
zero()
Sets all values inside the matrix to zero
-
Method Details
-
getNumRows
int getNumRows()Returns the number of rows in this matrix.- Returns:
- Number of rows.
-
getNumCols
int getNumCols()Returns the number of columns in this matrix.- Returns:
- Number of columns.
-
zero
void zero()Sets all values inside the matrix to zero -
copy
Creates an exact copy of the matrix -
createLike
Creates a new matrix with the same shape as this matrix -
create
Creates a new matrix of the same type with the specified shape -
setTo
Sets this matrix to be identical to the 'original' matrix passed in. -
print
void print()Prints the matrix to standard out using standard formatting. This is the same as calling print("%e") -
print
Prints the matrix to standard out with the specified formatting.- Parameters:
format
- printf style formatting for a float. E.g. "%f"- See Also:
-
getType
MatrixType getType()Returns the type of matrix
-