CholeskyInverse¶
- class paminco.linalg.CholeskyInverse(cho_fac, return_reduced: bool = False)[source]¶
A class representing the inverse of some matrix based on the cho decomp.
- Parameters
- cho_factuple
The cholesky decomposition as returned by scipy.linalg.cho_factor
- return_reducedbool, default=False
If true, this represents the reduced matrix (w/o zero row/column)
Notes
A cholesky inverse works in part like a ndarray. It implements the dotproduct (dot), returns the shape of the inverse (shape), supports slicing and can be converted in an ndarray using toarray().
Using
toarray()
orslicing
will result in an explicit computation of the inverse. The actual inverse will then be cached and make future calls of toarray, dot, and slicing faster.- Attributes
- cho: TODO
- return_redcued: TODO
- array: TODO
Methods
__init__
(cho_fac[, return_reduced])dot
(other[, reduced])Compute the dot product of self and other.
toarray
([caching])Return the inverse as ndarray.
update_by_edge
(net, edge, delta_c)Update inverse accoding to edgeweight change delta_c on edge.
Attributes
shape
Return the shape of the matrix represented by this object.