pint.utils.sherman_morrison_dot
- pint.utils.sherman_morrison_dot(Ndiag, v, w, x, y)[source]
-
N is a diagonal matrix, and w is a positive real number, using the Sherman-Morrison identity
- Additionally,
det[C] = det[N] * (1 + w (v| N^-1 |v)) )
Paremeters
- Ndiag: array-like
Diagonal elements of the diagonal matrix N
- v: array-like
A vector that represents a rank-1 update to N
- w: float
Weight associated with the rank-1 update
- x: array-like
Vector 1 for the inner product
- y: array-like
Vector 2 for the inner product
- returns:
result (float) – The inner product
logdetC (float) – log-determinant of C