adelie.adelie_core.matrix.MatrixCovDense32F#
- class adelie.adelie_core.matrix.MatrixCovDense32F#
Core matrix class for covariance dense matrix.
Methods
__init__
(self, mat, n_threads)bmul
(self, arg0, arg1, arg2, arg3)Computes a block matrix-sparse vector multiplication.
cols
(self)Returns the number of columns.
mul
(self, arg0, arg1, arg2)Computes a matrix-sparse vector multiplication.
rows
(self)Returns the number of rows.
to_dense
(self, arg0, arg1, arg2)Converts a block to a dense matrix.
Attributes
Number of dimensions.
Shape of the matrix.
- __init__(self: adelie.adelie_core.matrix.MatrixCovDense32F, mat: numpy.ndarray[numpy.float32[m, n], flags.f_contiguous], n_threads: int) None #
- bmul(self: adelie.adelie_core.matrix.MatrixCovBase32, arg0: numpy.ndarray[numpy.int64[1, n]], arg1: numpy.ndarray[numpy.int64[1, n]], arg2: numpy.ndarray[numpy.float32[1, n]], arg3: numpy.ndarray[numpy.float32[1, n], flags.writeable]) None #
Computes a block matrix-sparse vector multiplication.
Computes the matrix-sparse vector multiplication
v.T @ A[:, subset]
wherev
is represented by the sparse-formatindices
andvalues
.- Parameters:
- subset(s,) ndarray
Vector of column indices of
A
to subset in increasing order.- indices(nnz,) ndarray
Vector of indices in increasing order.
- values(nnz,) ndarray
Vector of values associated with
indices
.- out(s,) ndarray
Vector to store the result.
- cols(self: adelie.adelie_core.matrix.MatrixCovBase32) int #
Returns the number of columns.
- Returns:
- colsint
Number of columns.
- mul(self: adelie.adelie_core.matrix.MatrixCovBase32, arg0: numpy.ndarray[numpy.int64[1, n]], arg1: numpy.ndarray[numpy.float32[1, n]], arg2: numpy.ndarray[numpy.float32[1, n], flags.writeable]) None #
Computes a matrix-sparse vector multiplication.
Computes the matrix-sparse vector multiplication
v.T @ A
wherev
is represented by the sparse-formatindices
andvalues
.- Parameters:
- indices(nnz,) ndarray
Vector of indices in increasing order.
- values(nnz,) ndarray
Vector of values associated with
indices
.- out(n,) ndarray
Vector to store in-place the result.
- rows(self: adelie.adelie_core.matrix.MatrixCovBase32) int #
Returns the number of rows.
- Returns:
- rowsint
Number of rows.
- to_dense(self: adelie.adelie_core.matrix.MatrixCovBase32, arg0: int, arg1: int, arg2: numpy.ndarray[numpy.float32[m, n], flags.writeable, flags.f_contiguous]) None #
Converts a block to a dense matrix.
Converts the block
A[i:i+p, i:i+p]
into a dense matrix.- Parameters:
- iint
Row index.
- pint
Number of rows.
- out(p, p) ndarray
Matrix to store the dense result.
- ndim#
Number of dimensions. It is always
2
.
- shape#
Shape of the matrix.