pg_utils.numerics.linalg.LinSysSolver
- class pg_utils.numerics.linalg.LinSysSolver(name: str = 'lin_solver', dependencies: list = [])[source]
Bases:
object
Linear system solver, abstract class for all linear solvers
- Variables:
Methods
__init__
([name, dependencies])eig
(A, **kwargs)Calculate eigenvalues and eigenvectors of a matrix; abstract, to be overriden
eig_g
(A, B, **kwargs)Calculate eigenvalues and eigenvectors of a generalized eigenvalue problem; abstract, to be overriden
eigh
(A, **kwargs)Calculate eigenvalues and eigenvectors of a Hermitian matrix; abstract, to be overriden
inv
(A, **kwargs)Invert a matrix; abstract, to be overriden
solve
(A, B[, diag, explicit])Solve a linear system; this is the final interface for solving linear systems.
solve_diag
(A, B, **kwargs)Solve a diagonal linear system; abstract, to be overriden
solve_explicit
(A, B, **kwargs)Solve a linear system via explicit inversion; abstract, to be overriden
- eig(A: ndarray, **kwargs) Tuple[ndarray, ndarray] [source]
Calculate eigenvalues and eigenvectors of a matrix; abstract, to be overriden
- eig_g(A: ndarray, B: ndarray, **kwargs) Tuple[ndarray, ndarray] [source]
Calculate eigenvalues and eigenvectors of a generalized eigenvalue problem; abstract, to be overriden
- eigh(A: ndarray, **kwargs) Tuple[ndarray, ndarray] [source]
Calculate eigenvalues and eigenvectors of a Hermitian matrix; abstract, to be overriden
- solve(A: ndarray, B: ndarray, diag: bool = False, explicit: bool = True, **kwargs) ndarray [source]
Solve a linear system; this is the final interface for solving linear systems.