runlmc.linalg.kronecker module

class runlmc.linalg.kronecker.Kronecker(A, B)[source]

Bases: runlmc.linalg.matrix.Matrix

Creates a class with a parsimonious representation of a Kronecker product of two runlmc.linalg.matrix.Matrix instances. For the Kronecker matrix \(K=A\otimes B\), the \(ij\)-th block entry is \(a_{ij}B\).

\(K\) is PSD if \(A,B\) are.

The implementation is based off of Gilboa, Saatçi, and Cunningham (2015).

Creates a Kronecker matrix.

Parameters:
  • A – the first matrix
  • B – the second matrix
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]