Releases: yixuan/spectra
Releases · yixuan/spectra
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
const
keyword, 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_VERSION
that are included by all eigen solvers - Added the wrapper class
SparseGenComplexShiftSolve
for eigen solver with complex shifts - Added the
SymGEigsShiftSolver
class for symmetric generalized eigen solver with real shifts - Added the wrapper class
SymShiftInvert
that can be used withSymGEigsShiftSolver
- Added test code for symmetric generalized eigen solver with real shifts
- Added an internal class
UpperHessenbergSchur
to compute the Schur decomposition of upper Hessenberg matrices more efficiently - Added a
Flags
template parameter to every matrix operation class (e.g.DenseCholesky
andDenseSymMatProd
), whose possible values areEigen::ColMajor
andEigen::RowMajor
. This parameter allows these wrapper classes to handle row-major matrices. If the input matrix is inconsistent with theFlags
parameter (e.g., ifFlags
isEigen::ColMajor
but 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
, andSparseSymMatProd
to 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_MAGN
is 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
Scalar
template 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
Flags
template parameter that exists in various class templates from0
to the more readable constantEigen::ColMajor
- Renamed the function
mat_prod
toperform_op
in theSparseRegularInverse
wrapper class. This makes the API more consistent when implementing new generalized eigen solvers - Improved the precision of
UpperHessenbergQR
andTridiagQR
by computing the Givens rotations in a more stable way - Added a deflation test to
TridiagQR
to 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
DoubleShiftQR
by computing the Householder reflectors in a more stable way - Improved the deflation test in
DoubleShiftQR
- More careful computation of residual vectors in the
Lanczos
process - Initial vectors in the
Lanczos
andArnoldi
processes are now forced to be in the range of theA
matrix - More sensible test for orthogonality in generating new random vectors in the
Lanczos
andArnoldi
processes - 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
BKLDLT
solver to improve precision in some tests
Spectra v0.8.1
Changed
- Fixed a bug in
BKLDLT
in which a wrong type was used, thanks to @jdbancal for the issue #64 - Fixed a bug in
BKLDLT
that caused segmentation fault in some edge cases, also reported by @jdbancal in issue #66 - The type
Eigen::Index
is 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
BKLDLT
class that implements the Bunch-Kaufman LDLT decomposition for symmetric indefinite matrices. According to the Eigen documentation, currentlyEigen::LDLT
cannot handle some special indefinite matrices such as[0, 1; 1, 0]
, butBKLDLT
is 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
DenseSymShiftSolve
now uses the newly addedBKLDLT
class to do the decomposition. This change broadens the class of matrices thatDenseSymShiftSolve
can handle, reduces memory use, and should also improve the numerical stability of the solver- Replaced
Eigen::SimplicialLDLT
withEigen::SparseLU
in theSparseSymShiftSolve
class, as some edge-case indefinite matrices may breakEigen::SimplicialLDLT
SparseSymShiftSolve
andSparseGenRealShiftSolve
will throw an error if the factorization failed, for example, on singular matrices- Fixed a missing
#include
inDenseCholesky.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
contrib
to 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 incontrib
may not be fully tested, so please use with caution. Feedback and report of issues are always welcome - Added an eigen solver
LOBPCGSolver
in thecontrib
directory using the LOBPCG algorithm, contributed by Anna Araslanova - Added a partial SVD solver
PartialSVDSolver
in thecontrib
directory - Added two internal classes
Arnoldi
andLanczos
to 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.
DenseSymMatProd
andSparseSymMatProd
) 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
SymEigsSolver
andGenEigsSolver
- 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
Spectra v0.6.0
Added
- Added virtual destructors to the
SymEigsSolver
andUpperHessenbergQR
classes
to fix compiler warnings, by Julian Kent - Added a
NUMERICAL_ISSUE
entry to theCOMPUTATION_INFO
enumeration to indicate
the status of Cholesky decomposition - Added the
info()
member function toDenseCholesky
andSparseCholesky
to
report the status of the decomposition - Added a missing
#include
item inSparseCholesky.h
, thanks to
Maxim Torgonsky - Added a
TypeTraits
class to retrieve additional numeric limits of scalar value
types
Changed
- Documentation updates
- Updated the project URL to https://spectralib.org
- Some internal improvements, such as pre-allocating vectors in loops, and changing
return type to reference, thanks to
Angelos Mantzaflaris - Improved the accuracy of symmetric and general eigen solvers
- Reduced the memory use of
UpperHessenbergQR
andTridiagQR
decompositions - Updated the included Catch2 to v2.0.1
- Updated the testing code using the new API of Catch2
- Updated Travis CI script
Spectra v0.5.0
Added
- Added the generalized eigen solver
SymGEigsSolver
in the regular inverse mode - Added the wrapper class
SparseRegularInverse
that can be used with
SymGEigsSolver
in the regular inverse mode - Added test code for generalized eigen solver in the regular inverse mode
Changed
- Improved the numerical precision and stability of some internal linear
algebra classes, includingTridiagEigen
,UpperHessenbergEigen
, and
DoubleShiftQR
- API change: The
x_in
argument in matrix operation functions, e.g.
perform_op()
, is now labelled to be constant - Fixed a bug that
GenEigsComplexShiftSolver
gave wrong results when transforming back the
eigenvalues, discovered by @jdbancal - Updated included Catch to v1.7.0
- Documentation improvement