adelie.adelie_core.matrix.MatrixCovSparse32F#

class adelie.adelie_core.matrix.MatrixCovSparse32F#

Core matrix class for covariance sparse matrix.

Methods

__init__(self, rows, cols, nnz, outer, ...)

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

ndim

Number of dimensions.

shape

Shape of the matrix.

__init__(self: adelie.adelie_core.matrix.MatrixCovSparse32F, rows: int, cols: int, nnz: int, outer: numpy.ndarray[numpy.int32[1, n]], inner: numpy.ndarray[numpy.int32[1, n]], value: numpy.ndarray[numpy.float32[1, n]], 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] where v is represented by the sparse-format indices and values.

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.

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 where v is represented by the sparse-format indices and values.

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.

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.