Releases: yixuan/spectra
Spectra v1.2.0
Following v1.1.0, this version of Spectra further improves the support for complex eigen solvers. The main update in v1.2.0 is that GenEigsSolver now supports general complex-valued matrices. See the Complex-valued Matrices section in the README for an example.
Added
- Added the support for complex-valued matrices in the
GenEigsSolvereigen solver - Added a separate
Givensclass for computing Givens rotations in a numerically stable way - Added the implementation of
UpperHessenbergQRandUpperHessenbergEigenfor complex-valued matrices - Added testing code for complex eigen solvers based on the
GenEigsSolverclass - Added testing code for the
Givensclass - Added
UpperHessenbergQRandUpperHessenbergEigentests for complex-valued matrices
Changed
UpperHessenbergQRnow uses theGivensclass to compute Givens rotations- Removed the redundant
Scalartemplate paramter in internal classes such asArnoldiOp,Arnoldi, andLanczos - The CMake script now uses CPM.cmake to manage the dependence on Eigen. By default, it will first search for Eigen in the system, and if it is not found, the script will automatically download the Eigen library. This functionality was contributed by @eduardz1 (#178)
- The minimum version for Clang-Format is now 16, and the configuration file is also updated
- Updated Doxygen configuration to v1.14.0
- Updated the included Catch2 to v2.13.10
- Updated author information
- Various documentation updates and improvements
Spectra v1.1.0
Happy New Year 2025! 🎉
This version of Spectra has a major update: the support for complex Hermitian matrices is finally added, and now you can use the HermEigsSolver eigen solver to compute real eigenvalues of Hermitian matrices. This functionality has been requested for a long time (e.g. #6 dating back to ten years ago!), and I am excited to make this first step. 🥳
Added
- Added the eigen solver
HermEigsSolverfor complex-valued Hermitian matrices - Added the support for complex Hermitian matrices to various linear algebra classes, such as
Arnoldi,Lanczos, andBKLDLT SimpleRandomcan now generate random complex values- Added testing code for Arnoldi factorization on both real matrices and complex Hermitian matrices
- Added
BKLDLTtests for complex Hermitian matrices - Added testing code for the
HermEigsSolversolver - Added test examples from previous bug reports
Changed
- Better heuristics for basis restarting in the Lanczos factorization, which fixes #159
- Fixed the support for non-literal data types (#150)
- Various CMake configuration improvements (#127, #140, #152), thanks to @LTLA, @JensWehner, @shivupa, @jschueller, @alecjacobson, and @jdumas
- Miscellaneous GitHub Actions updates
- Various internal implementation changes to accommodate operations on complex-valued matrices
- Improved the numerical stability of
BKLDLTlinear system solver - Change
SymEigsBasetoHermEigsBaseas the base class for both real symmetric and complex Hermitian eigen solvers
Spectra v1.0.1
Added
- Added SIMD support for
UpperHessenbergSchur. This should accelerate general eigen solvers such asGenEigsSolver - Added test code for
UpperHessenbergSchur
Changed
- Fixed several bugs in the examples caused by the
constkeyword, reported by @alexpghayes (#135, #137) - Updated the included Catch2 to v2.13.8
Spectra v1.0.0
Finally, Spectra v1.0.0 is released!
This new version is the accumulation of dozens of new features and bug fixes, with the help of many users and contributors. The most visible changes compared to v0.9.0 include fully refactored code base using C++11, a redesigned API, and the newly added Davidson eigen solver by Jens Wehner and his group. More details can be found below and in the migration guide.
Added
- Added version macros
SPECTRA_MAJOR_VERSION,SPECTRA_MINOR_VERSION,SPECTRA_PATCH_VERSION, andSPECTRA_VERSIONthat are included by all eigen solvers - Added the wrapper class
SparseGenComplexShiftSolvefor eigen solver with complex shifts - Added the
SymGEigsShiftSolverclass for symmetric generalized eigen solver with real shifts - Added the wrapper class
SymShiftInvertthat can be used withSymGEigsShiftSolver - Added test code for symmetric generalized eigen solver with real shifts
- Added an internal class
UpperHessenbergSchurto compute the Schur decomposition of upper Hessenberg matrices more efficiently - Added a
Flagstemplate parameter to every matrix operation class (e.g.DenseCholeskyandDenseSymMatProd), whose possible values areEigen::ColMajorandEigen::RowMajor. This parameter allows these wrapper classes to handle row-major matrices. If the input matrix is inconsistent with theFlagsparameter (e.g., ifFlagsisEigen::ColMajorbut the input matrix is row-major), a compiler error will occur - Added the member function
info()and convergence tests toSparseRegularInverse, suggested by @Spammed (#111) - Added symmetric Davidson eigen solver
DavidsonSymEigsSolver, written by Felipe Zapata, Nicolas Renaud, Victor Azizi, Pablo Lopez-Tarifa, and Jens Wehner from the Netherlands eScience Center - Extended matrix operations in
DenseGenMatProd,DenseSymMatProd,SparseGenMatProd, andSparseSymMatProdto handle matrix-matrix products and coefficient-wise accessors
Changed
- API change: Spectra now requires C++11
- API change: All enumerations have been converted to enum classes (e.g.
LARGEST_MAGNis nowSortRule::LargestMagn) - API change: Selection rules are no longer template parameters. They are now specified in the
compute()member function as arguments - API change: The
Scalartemplate parameter has been removed from eigen solvers. Instead, matrix operation classes now need to define a public type namedScalar - API change: Constructors of solvers now request references of matrix operators instead of pointers
- Clang-Format now uses the C++11 standard to format code
- Updated documentation to reflect the new API
- Many internal changes to make use of C++11 features
- Added a
SPECTRA_prefix to each header guard to prevent potential name clash - Changed the default value of the
Flagstemplate parameter that exists in various class templates from0to the more readable constantEigen::ColMajor - Renamed the function
mat_prodtoperform_opin theSparseRegularInversewrapper class. This makes the API more consistent when implementing new generalized eigen solvers - Improved the precision of
UpperHessenbergQRandTridiagQRby computing the Givens rotations in a more stable way - Added a deflation test to
TridiagQRto accelerate the convergence of eigen solvers - Improved the precision of
TridiagQR::matrix_QtHQ()by directly applying rotations to the original input matrix - Improved the precision of
DoubleShiftQRby computing the Householder reflectors in a more stable way - Improved the deflation test in
DoubleShiftQR - More careful computation of residual vectors in the
Lanczosprocess - Initial vectors in the
LanczosandArnoldiprocesses are now forced to be in the range of theAmatrix - More sensible test for orthogonality in generating new random vectors in the
LanczosandArnoldiprocesses - In symmetric eigen solvers large shifts are applied first to increase precision
- Updated the included Catch2 to v2.13.6
Spectra v0.9.0
Added
- Added support for CMake build, contributed by Guillaume Acke and Jens Wehner (#70, #88)
- Spectra can now be installed via conda-forge, thanks to Guillaume Acke and Julien Schueller (#81, #85)
- The source code of Spectra is now formatted using ClangFormat, suggested by Jens Wehner
Changed
- Fixed a compiler warning caused by unused parameter, contributed by Julien Schueller (#80)
- Changed the implementation of
BKLDLTsolver to improve precision in some tests
Spectra v0.8.1
Changed
- Fixed a bug in
BKLDLTin which a wrong type was used, thanks to @jdbancal for the issue #64 - Fixed a bug in
BKLDLTthat caused segmentation fault in some edge cases, also reported by @jdbancal in issue #66 - The type
Eigen::Indexis now globally used for indices and sizes, in order to handle potentially large matrices. This was suggested by Yuan Yao in issue #19
Spectra v0.8.0
Added
- Added a
BKLDLTclass that implements the Bunch-Kaufman LDLT decomposition for symmetric indefinite matrices. According to the Eigen documentation, currentlyEigen::LDLTcannot handle some special indefinite matrices such as[0, 1; 1, 0], butBKLDLTis applicable to any symmetric matrices as long as it is not singular. LDLT decomposition is used in shift-and-invert solvers (see below) - Added a unit test for
BKLDLT
Changed
DenseSymShiftSolvenow uses the newly addedBKLDLTclass to do the decomposition. This change broadens the class of matrices thatDenseSymShiftSolvecan handle, reduces memory use, and should also improve the numerical stability of the solver- Replaced
Eigen::SimplicialLDLTwithEigen::SparseLUin theSparseSymShiftSolveclass, as some edge-case indefinite matrices may breakEigen::SimplicialLDLT SparseSymShiftSolveandSparseGenRealShiftSolvewill throw an error if the factorization failed, for example, on singular matrices- Fixed a missing
#includeinDenseCholesky.h, thanks to Lennart Trunk for the issue #59 - Fixed errors in examples (#60), thanks to @linuxfreebird
- Updated the included Catch2 to v2.7.0
Spectra v0.7.0
Added
- Added a directory
contribto include code contributed by users. It is not formally a part of the Spectra library, but it may contain useful solvers and applications based on Spectra. Code incontribmay not be fully tested, so please use with caution. Feedback and report of issues are always welcome - Added an eigen solver
LOBPCGSolverin thecontribdirectory using the LOBPCG algorithm, contributed by Anna Araslanova - Added a partial SVD solver
PartialSVDSolverin thecontribdirectory - Added two internal classes
ArnoldiandLanczosto compute the Arnoldi/Lanczos factorization in eigen solvers - Added a few other internal classes to refactor the eigen solver classes (see below)
Changed
- API change: Spectra now requires Eigen >= 3.3
- API change: The library header files are moved into a directory named
Spectra. Hence the recommended include directive would look like#include <Spectra/SymEigsSolver.h> - All eigen solvers have been refactored using a cleaner class hierarchy. It may potentially make the implementation of new eigen solvers easier, especially for generalized eigen problems
- The matrix operation classes (e.g.
DenseSymMatProdandSparseSymMatProd) are now internally using an Eigen::Ref object to wrap the user matrices, thanks to Dario Mangoni who raised this issue in #16 - Fixed inappropriate range of random numbers in the tests
Spectra v0.6.2
Changed
- Fixed regressions in v0.6.0 on some edge cases
- Improved the accuracy of restarting processes in
SymEigsSolverandGenEigsSolver - Updated the included Catch2 to v2.2.2
- Code and documentation cleanup
Spectra v0.6.1
Changed
- Fixed a bug of uninitialized memory
- Updated the included Catch2 to v2.1.2