Package org.ejml.data
Interface Matrix
-
- All Superinterfaces:
java.io.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
public interface Matrix extends java.io.SerializableBase interface for all rectangular matrices
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <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>
TcreateLike()Creates a new matrix with the same shape as this matrixintgetNumCols()Returns the number of columns in this matrix.intgetNumRows()Returns the number of rows in this matrix.MatrixTypegetType()Returns the type of matrixvoidprint()Prints the matrix to standard out using standard formatting.voidprint(java.lang.String format)Prints the matrix to standard out with the specified formatting.voidset(Matrix original)Sets this matrix to be identical to the 'original' matrix passed in.voidzero()Sets all values inside the matrix to zero
-
-
-
Method Detail
-
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
<T extends Matrix> T copy()
Creates an exact copy of the matrix
-
createLike
<T extends Matrix> T createLike()
Creates a new matrix with the same shape as this matrix
-
create
<T extends Matrix> T create(int numRows, int numCols)
Creates a new matrix of the same type with the specified shape
-
set
void set(Matrix original)
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
void print(java.lang.String format)
Prints the matrix to standard out with the specified formatting.- Parameters:
format- printf style formatting for a float. E.g. "%f"- See Also:
Formatter
-
getType
MatrixType getType()
Returns the type of matrix
-
-