Gets the (i, j)-th element.
Gets the (i, j)-th element.
Returns an iterator of column vectors.
Returns an iterator of column vectors. This operation could be expensive, depending on the underlying storage.
Get a deep copy of the matrix.
Get a deep copy of the matrix.
Applies a function f
to all the active elements of dense and sparse matrix.
Applies a function f
to all the active elements of dense and sparse matrix. The ordering
of the elements are not defined.
the function takes three parameters where the first two parameters are the row
and column indices respectively with the type Int
, and the final parameter is the
corresponding value in the matrix with type Double
.
Find the number of values stored explicitly.
Find the number of values stored explicitly. These values can be zero as well.
Number of columns.
Number of columns.
Find the number of non-zero active values.
Find the number of non-zero active values.
Number of rows.
Number of rows.
Transpose the Matrix.
Transpose the Matrix. Returns a new Matrix
instance sharing the same underlying data.
Returns a matrix in dense column major, dense row major, sparse row major, or sparse column major format, whichever uses less storage.
Returns a matrix in dense column major, dense row major, sparse row major, or sparse column major format, whichever uses less storage. When dense representation is optimal, it maintains the current layout order.
Returns a matrix in dense or sparse column major format, whichever uses less storage.
Returns a matrix in dense or sparse column major format, whichever uses less storage.
Returns a matrix in dense or sparse row major format, whichever uses less storage.
Returns a matrix in dense or sparse row major format, whichever uses less storage.
Flag that keeps track whether the matrix is transposed or not.
Flag that keeps track whether the matrix is transposed or not. False by default.
Convenience method for Matrix
-Vector
multiplication.
Convenience method for Matrix
-Vector
multiplication.
Convenience method for Matrix
-DenseVector
multiplication.
Convenience method for Matrix
-DenseVector
multiplication. For binary compatibility.
Convenience method for Matrix
-DenseMatrix
multiplication.
Convenience method for Matrix
-DenseMatrix
multiplication.
Returns an iterator of row vectors.
Returns an iterator of row vectors. This operation could be expensive, depending on the underlying storage.
Converts to a dense array in column major.
Converts to a dense array in column major.
Converts this matrix to a dense matrix while maintaining the layout of the current matrix.
Converts this matrix to a dense matrix while maintaining the layout of the current matrix.
Converts this matrix to a dense matrix in column major order.
Converts this matrix to a dense matrix in column major order.
Converts this matrix to a dense matrix in row major order.
Converts this matrix to a dense matrix in row major order.
Converts this matrix to a sparse matrix while maintaining the layout of the current matrix.
Converts this matrix to a sparse matrix while maintaining the layout of the current matrix.
Converts this matrix to a sparse matrix in column major order.
Converts this matrix to a sparse matrix in column major order.
Converts this matrix to a sparse matrix in row major order.
Converts this matrix to a sparse matrix in row major order.
A human readable representation of the matrix with maximum lines and width
A human readable representation of the matrix with maximum lines and width
A human readable representation of the matrix
A human readable representation of the matrix
Trait for a local matrix.