MatrixInterface module

Interface for the Matrix representation.

class MatrixInterface.Matrix(n, elements)

Bases: abc.ABC

Defines the Matrix.

apply(v)
abstract multiply(m)
class MatrixInterface.MatrixElement(i, j, val)

Bases: object

Gets Matrix Element.

class MatrixInterface.SquareMatrix(dims)

Bases: abc.ABC

apply(v)
abstract multiply()
class MatrixInterface.Vector(elements)

Bases: object

outer(other_vec)

Returns the outer (kronecker) product of two vectors

Parameters

other_vec – (array) The other Vector in the multiplication

Returns

(array) The final vector product

class MatrixInterface.explicit(n, elements)

Bases: MatrixInterface.Matrix

enumerator()
multiply(a, b)