mat: Redesign Eigen
Created by: btracey
Right now, Eigen stores the eigenvalue matrix as a *Dense. Conceptually, this is wrong, because in the general case, it's really a complex matrix. The code instead uses extra rows and columns to represent complex values, which means that the physical size of the matrix is larger than its conceptual size. It would be better to just have the values just be complex. Acyclic imports mean we can't have mat128 depend on mat64 and vis-versa, but we can have mat64 import blas128. Eigen can return the blas structs, which can then be converted into mat128 matrices. This will take some work to interface with lapack routines, but not doing this work means we just push the problem onto the user (making them do the conversion from 2x2 float64 blocks to complex values). The eigenvalues by blas128.Banded
We should also reconsider the function signatures. First of all, it seems easier to me to have it be Eigen(a *Dense, epsilon) (eigenvalues blas128.Banded, eigenvectors *Dense) I'm not sure what the EigenFactors struct helps with Secondly, we should also have EigenSym(a *Symmetric, epsilon) (eigenvalues *Diagonal, eigenvectors *Dense) as the eigenvalues of a symmetric matrix are real. The asymmetry between the two is unfortunate (Diagonal vs. Banded), however there is no Diagonal matrix in BLAS. We could add a definition both into blas64 and blas128, or we could plausibly have a non-blas package containing the definition of RawDiagonal (name tbd) for both complex and real diagonal matrices. We could also leave as-is, and solve the problem in a different manner (there are a few choices).