flipper.kernel.matrix.Matrix

class flipper.kernel.matrix.Matrix(data)[source]

Bases: object

This represents a matrix.

copy()[source]

Return a copy of this Matrix.

directed_eigenvector(condition_matrix)[source]

Return an interesting (eigenvalue, eigenvector) pair which lives inside of the cone C, defined by condition_matrix.

See realalg for the definition of interesting.

Raises a ComputationError if it cannot find an interesting vectors in C. Assumes that C contains at most one interesting eigenvector.

elementary(i, j, k=1)[source]

Return the matrix obtained by performing the elementary move: replace row i by row i + k * row j.

flatten()[source]

Return the entries of this matrix as a single flattened list.

is_square()[source]

Return if this matrix is square.

join(other)[source]

Return the matrix:

(self )
(-----)
(other)

This is the same as Sages Matrix.stack() function.

nonnegative_image(v)[source]

Return if self * v >= 0.

transpose()[source]

Return the transpose of this matrix.

tweak(increment, decrement)[source]

Return a copy of this matrix where each increment entry has been increased by 1 and each decrement entry has been decreased by 1.