class documentation

class DecomposingPositiveMatrix(SquareMatrix):

View In Hierarchy

Symmetric matrix maintaining its own eigendecomposition.

If isinstance(C, DecomposingPositiveMatrix), the eigendecomposion (the return value of eig) is stored in the attributes eigenbasis and eigenvalues such that the i-th eigenvector is:

[row[i] for row in C.eigenbasis]  # or equivalently
[C.eigenbasis[j][i] for j in range(len(C.eigenbasis))]

with eigenvalue C.eigenvalues[i] and hence:

C = C.eigenbasis x diag(C.eigenvalues) x C.eigenbasis^T
Method __init__ initialize with identity matrix
Method mahalanobis_norm return (dx^T * C^-1 * dx)**0.5
Method update_eigensystem Execute eigendecomposition of self if current_eval > lazy_gap_evals + last_updated_eval.
Instance Variable condition_number Undocumented
Instance Variable eigenbasis Undocumented
Instance Variable eigenvalues Undocumented
Instance Variable invsqrt Undocumented
Instance Variable updated_eval Undocumented
Method _enforce_symmetry Undocumented

Inherited from SquareMatrix:

Method addouter Add in place factor times outer product of vector b,
Method multiply_with multiply matrix in place with factor
Property diag diagonal of the matrix as a copy (save to change)
def __init__(self, dimension):

initialize with identity matrix

def mahalanobis_norm(self, dx):

return (dx^T * C^-1 * dx)**0.5

def update_eigensystem(self, current_eval, lazy_gap_evals):

Execute eigendecomposition of self if current_eval > lazy_gap_evals + last_updated_eval.

Assumes (for sake of simplicity) that self is positive definite and hence raises a RuntimeError otherwise.

condition_number =

Undocumented

eigenbasis =

Undocumented

eigenvalues =

Undocumented

invsqrt =

Undocumented

updated_eval =

Undocumented

def _enforce_symmetry(self):

Undocumented