class documentation
class DecomposingPositiveMatrix(SquareMatrix):
Constructor: DecomposingPositiveMatrix(dimension)
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 |
return (dx^T * C^-1 * dx)**0.5 |
Method | update |
Execute eigendecomposition of self if current_eval > lazy_gap_evals + last_updated_eval. |
Instance Variable | condition |
Undocumented |
Instance Variable | eigenbasis |
Undocumented |
Instance Variable | eigenvalues |
Undocumented |
Instance Variable | invsqrt |
Undocumented |
Instance Variable | updated |
Undocumented |
Method | _enforce |
Undocumented |
Inherited from SquareMatrix
:
Method | addouter |
Add in place factor times outer product of vector b , |
Method | multiply |
multiply matrix in place with factor |
Property | diag |
diagonal of the matrix as a copy (save to change) |