runlmc.linalg.block_matrix module

class runlmc.linalg.block_matrix.SymmSquareBlockMatrix(blocks)[source]

Bases: runlmc.linalg.matrix.Matrix

Creates a block matrix from a 2D array of matrices, which must all be square. The blocks array is assumed to be symmetric. :param blocks: a 2D array :raises ValueError: if the size is 0.

as_numpy()[source]
Returns:numpy matrix equivalent, as a 2D numpy.ndarray
matvec(x)[source]

Multiply a vector \(\textbf{x}\) by this matrix, \(K\), yielding \(K\textbf{x}\).

Parameters:x – a one-dimensional numpy array of the same size as this matrix
Returns:the matrix-vector product
upper_eig_bound()[source]