Description
eig
, eigh
, inv
, solve
, det
, svd
, ... . A possible implementation is here: https://github.com/certik/fortran-utils/blob/b43bd24cd421509a5bc6d3b9c3eeae8ce856ed88/src/linalg.f90.
All these functions will be implemented in stdlib_linalg
module, and they would probably just call Lapack. The general idea of these routines is to be general routines that will just work, with a simple intuitive interface, and the highest performance given the simple API. One can always achieve higher performance with more specialized routines for a particular problem (and more complicated API), but that is not the point here. Rather we would like a Matlab / NumPy style routines to do linear algebra.
In particular, let's start with eig
, for an eigenvalue and eigenvectors of a general (non-symmetric) matrix. Both NumPy and Matlab have a very similar interface called eig
, that I propose we use:
- NumPy: https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.eig.html
- Matlab: https://www.mathworks.com/help/matlab/ref/eig.html
Julia seems to have more of an "object oriented" interface called eigen
: https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/index.html#LinearAlgebra.eigen, which uses some Julia language features to emulate the Matlab style vals, vecs = eigen([1.0 0.0 0.0; 0.0 3.0 0.0; 0.0 0.0 18.0])
.