Network.Lstar¶
- Network.Lstar(weight=None, flow=None, reduced: bool = False, method: paminco.linalg.InverseMethod = InverseMethod.CHOLESKY, safe: bool = True, **kwargs)[source]¶
Pseudo-inverse of weighted Laplacian.
- Parameters
- weightnp.ndarray, optional
If None, weigths of Laplacian are determined based on flow.
- flownp.ndarray, optional
Use flow to determine weights if
weights is None
.- reducedbool, default=False
Whether to return the reduced form, i.e., without first row and first column.
- method: int, str, or InverseMethod, default=InverseMethod.CHOLESKY
Method used to calculate inverse.
- safebool, default=True
If True (default), matrix will only be inverted if network is connected.
- Returns
- ndarray or CholeskyInverse
The pseudo inverse of the weighted Laplacian.
- Raises
- SingularLaplaceError
Network is not connected.
- numpy.linalg.LinAlgError
Inverting matrix failed.
See also
Network.connected_components
Connectedness of the network.
Network.L
Laplacian matrix.
paminco.linalg.star_inv
generalized inverse of a matrix.
paminco.linalg.CholeskyInverse
Inverting a matrix using choleksy decomposition.