pg_utils.numerics.linalg.MultiPrecLinSolver
- class pg_utils.numerics.linalg.MultiPrecLinSolver(prec: int = 113)[source]
Bases:
LinSysSolver
Multi-precision linear solver, built on gmpy2 + flamp, up to arbitrary precision
- Variables:
prec (int) – internal calculation precision
Methods
__init__
([prec])eig
(A, **kwargs)Calculate eigenvalues and eigenvectors of a matrix
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
inv
(A, **kwargs)Invert a matrix
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
solve_explicit
(A, B, **kwargs)Solve a linear system via explicit inversion
- eig(A: ndarray, **kwargs) Tuple[ndarray] [source]
Calculate eigenvalues and eigenvectors of a matrix
- 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] [source]
Calculate eigenvalues and eigenvectors of a Hermitian matrix