Skip to content

Spectra v1.0.0

Compare
Choose a tag to compare
@yixuan yixuan released this 01 Jul 13:16
· 52 commits to master since this release

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, and SPECTRA_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 with SymGEigsShiftSolver
  • 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 and DenseSymMatProd), whose possible values are Eigen::ColMajor and Eigen::RowMajor. This parameter allows these wrapper classes to handle row-major matrices. If the input matrix is inconsistent with the Flags parameter (e.g., if Flags is Eigen::ColMajor but the input matrix is row-major), a compiler error will occur
  • Added the member function info() and convergence tests to SparseRegularInverse, 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, and SparseSymMatProd 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 now SortRule::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 named Scalar
  • 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 from 0 to the more readable constant Eigen::ColMajor
  • Renamed the function mat_prod to perform_op in the SparseRegularInverse wrapper class. This makes the API more consistent when implementing new generalized eigen solvers
  • Improved the precision of UpperHessenbergQR and TridiagQR 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 and Arnoldi processes are now forced to be in the range of the A matrix
  • More sensible test for orthogonality in generating new random vectors in the Lanczos and Arnoldi processes
  • In symmetric eigen solvers large shifts are applied first to increase precision
  • Updated the included Catch2 to v2.13.6