New features:
AutoDiffScalar overloads of atan, log1p, expm1, log2, log10, cbrt, asinh, acosh and atanh [#234, !3448]ArrayBase::logicalShiftRight<N>(), a zero-filling right shift, alongside arithmeticShiftRight<N>() and logicalShiftLeft<N>() as the spelled-out names for the existing shift operators [!2816]ILP64) integers (eigen_blas_ilp64 and eigen_blas_ilp64_static, controlled by EIGEN_BUILD_BLAS_ILP64)ILP64) integers (eigen_lapack_ilp64 and eigen_lapack_ilp64_static, controlled by EIGEN_BUILD_LAPACK_ILP64), which link against the ILP64 BLAS library [!3504]SSYTRF/DSYTRF, CHETRF/ZHETRF and their xSYTRS/xHETRS solves in Eigen's LAPACK library, computed by BunchKaufman‘s kernel with reference LAPACK’s choice of pivots [!3504]xPSTRF in Eigen's LAPACK library, computed by LDLT's complete diagonal pivoting, which stops at the numerical rank [!3504]xGETRI, xPOTRI, xTRTRI, xLAUUM and xTRTRS in Eigen's LAPACK library, built on TriangularView::inverseInPlace(), the triangular product kernel of LLT::inverse() and the blocked triangular solves [!3504]CHEEV and ZHEEV in Eigen's LAPACK library, the complex Hermitian counterparts of SSYEV and DSYEV [!3504]xGEQRF, xORGQR/xUNGQR and xORMQR/xUNMQR in Eigen‘s LAPACK library, built on Eigen’s blocked Householder QR and block-reflector kernels [!3504]PreconditionSquareMatrix option, which applies JacobiSVD's QR preconditioners to square matrices. BDCSVD forwards this option to JacobiSVD for matrices smaller than the switch size [!3212]DenseBase::replicate and VectorwiseOp::replicate accept Eigen::fix<N> factors [!3262, !3282]BunchKaufman, the Bunch-Kaufman factorization P A P^T = L D L^* of a real symmetric or complex Hermitian matrix, with D block diagonal in 1x1 and 2x2 blocks. Unlike LLT and LDLT it is backward stable on indefinite matrices, the dense analog of LAPACK's ?sytrf and ?hetrf. It solves, estimates rcond(), computes the determinant, reveals the inertia through isPositive() and isNegative(), and supports in-place decomposition. Also available as MatrixBase::bunchKaufman() and SelfAdjointView::bunchKaufman() [!2612, !2991]MultifrontalLDLT in SparseCholesky, a sparse multifrontal LDL^* factorization of symmetric or Hermitian indefinite matrices with 1x1 and 2x2 threshold pivots [!3523]absDeterminant(), logAbsDeterminant() and signDeterminant() on LLT, LDLT, BunchKaufman, PartialPivLU, FullPivLU and the Simplicial* sparse Cholesky solvers, and determinant() on LLT and LDLT. Together, logAbsDeterminant() and signDeterminant() represent a determinant that would overflow or underflow [!2991]SelfAdjointView::applyPermutation() and SelfAdjointView::applyTransposition(), which replace the viewed matrix S by P S P^T in place, reading and writing only the stored triangle [#3174, !3395]DiscreteAlgebraicRiccatiSolver in the new contrib module Riccati, for the stabilizing solution of the (generalized) discrete-time algebraic Riccati equation with real or complex scalars [!3403]GPU (#define EIGEN_USE_GPU, then #include <contrib/Eigen/GPU>), which runs dense and sparse linear algebra on NVIDIA GPUs from host code through cuBLAS, cuSOLVER, cuSPARSE, cuFFT and cuDSS, and runs ConjugateGradient on device-resident vectors. Requires the CUDA Toolkit; see the manual page “Offloading linear algebra to a GPU with the GPU module” [!2412, !2413, !2414, !2415, !2476, !2681, !3130, !3135]IntDivider, which divides integers by a divisor known only at run time with a multiplication and shifts in place of division instructions, for scalars (n / IntDivider<int>(d), n /= by) and coefficient-wise for dense expressions (A / IntDivider<int>(d), A /= by). The expression is vectorized for 32-bit integers with SSE2, AVX, AVX2 and NEON and for 64-bit integers with AVX2; AVX-512 vectorizes the signed types only [!3509]A.cast<float>() * B.cast<float>() or A * B.cast<float>(), converts that operand while packing it instead of materializing the cast, unless EIGEN_USE_BLAS is defined or SME is enabled [!3454]LLT::inverse() and TriangularView::inverseInPlace(), which invert in place by the recurrences of LAPACK's xPOTRI and xTRTRI: each triangle bounds the right residual |X T - I| as xTRTRI does, so LLT<Lower>::inverse() bounds |X_L L - I| and LLT<Upper>::inverse() the left residual of L = U^*, as xPOTRI ‘L’ and ‘U’ do on the POTRI path; for a real n below EIGEN_LLT_INVERSE_POTRI_THRESHOLD and a separate destination, LLT::inverse() solves against the identity instead. Intermediate products overflow in the order of xTRTRI's recurrence: a column-graded U such as [[2^-600, 2^600], [0, 2^600]] can overflow where the exact inverse is finite [!2977, !3503]Bug fixes:
SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver with complex scalars let the imaginary part of the diagonal of the input, which a selfadjoint matrix does not have, affect the result: an infinite or NaN imaginary part gave NoConvergence, a huge one gave wrong eigenvalues with Success, and in the generalized solver any nonzero one spread into the off-diagonal of the reduced matrix; they now ignore that part, as LAPACK's xHEEV and xHEGV do [!3503]half or two bfloat16 matrices on the general matrix-matrix kernel rounded every multiply-add, or every depth block, to the operand type; it now sums in float over the whole depth and rounds each result coefficient once, which makes half products about 2x slower on hardware with native half arithmetic [#3158, !3454]EIGEN_USE_BLAS and EIGEN_USE_OPENBLAS_BFLOAT16, a bfloat16 matrix-matrix product that reached OpenBLAS's sbgemm dropped the destination in C += A * B and added an uninitialized buffer in C = A * B; under EIGEN_DEFAULT_TO_ROW_MAJOR it also wrote its result transposed and out of bounds [#3215, !3480]EIGEN_USE_BLAS and EIGEN_DEFAULT_TO_ROW_MAJOR, matrix-matrix products that reached ?gemm with a conjugated operand, ?symm, ?hemm or ?trmm could return wrong results: the adapters' temporaries took the row-major default storage order [!3480]MatrixBase::isLowerTriangular() skipped the last strictly-upper coefficient of every column past the diagonal block, reporting some wide matrices as lower triangular [!2814]ArrayBase::shiftRight<N>() and ArrayBase::shiftLeft<N>() did not compile in any configuration, their functors having dropped the shift count [!2814]numext::arithmetic_shift_right() sign-extended unsigned scalars, so the scalar and vectorized paths of one shift expression disagreed [!2814]Transform::inverse(Projective) returned an uninitialized result for every mode other than Projective [!2814]DGMRES::iterations() returned maxIterations() after every solve, including converged ones [!2814]BDCSVD with QR-only Options, such as DisableQRDecomposition, dropped runtime unitary requests for inputs below the switch size, so matrixU() asserted, or returned an empty U and V under NDEBUG [!3212]JacobiSVD with FullPivHouseholderQRPreconditioner accepted ComputeThinV and returned a non-orthogonal V for wide inputs; it now fails to compile, or asserts when requested at runtime [!3212]HouseholderQR (and the decompositions and SplineFitting built on it) and JacobiSVD did not compile with AutoDiffScalar [#3192, !3265]Affine or Isometry Transform from a (Dim+1)x(Dim+1) matrix copied its last row verbatim; the last row is now set to [0 ... 0 1], as for Dim x Dim and Dim x (Dim+1) inputs [#2715, !3412]LDLT pivoted on the diagonal of its input rather than of the remaining Schur complement, so zero pivots of a semidefinite matrix could come before non-zero ones and report NumericalIssue, as for [1 1 0; 1 1 0; 0 0 1]; a NaN or infinite pivot reported Success. LDLT now also factors dynamic-size matrices larger than 96 in blocks, with a panel width that grows as sqrt(3 n): 1.7x faster at n = 128, 3.1x at n = 1024 and 6.2x at n = 3000 [!3423]IOFormat could insert unwanted spaces between matrix rows when using custom row separators or prefixes.Tensor, as when one is assigned to an empty slice, passed a null pointer to memcpy, which is undefined behavior [#3411, !3643]AMDOrdering with 32-bit indices, and so the Simplicial* Cholesky solvers and IncompleteCholesky, which use it by default, and IncompleteLUT, could stall for minutes and then crash on matrices with a few hundred thousand columns or more: on a node with fewer than 10*sqrt(n) neighbours, most of them at high indices, the signed supervariable hash overflowed and indexed the workspace out of bounds. The hash is now unsigned, as in SuiteSparse AMD, and orderings that did not overflow are unchangedxLARFB with DIRECT = 'B' applied the reflectors at the wrong rows when the implicit unit diagonal of V was stored as zero [!3502]xLADIV returned NaN or zero for operands near the overflow threshold; xLAPY2 returned infinity for an infinite and a NaN argument; xPOTRF reported success for a NaN pivot; xGESDD returned INFO = 0 for a matrix containing NaN, where reference LAPACK returns -4; xGESDD returned uninitialized outputs for a matrix containing Inf, and xGESVD zero singular values for one containing Inf or NaN, where reference LAPACK returns NaN singular values for Inf (both routines now return NaN outputs with INFO = 0); and ILAVER reported 3.4.1 instead of 3.12.1, the reference release the routines follow [!3502]?axpy and ?gemmtr read their operands when alpha is zero, so an infinite or NaN operand made the result NaN; ?copy with incy = 0, and ?swap and ?axpby with a zero increment, did nothing; ?trsm applied alpha after the solve and could overflow where the result does not; real i?amax returned an ISA-dependent index for vectors holding NaN; crotg and zrotg returned NaN for large representable inputs and used the conventions of Reference BLAS before 3.10; csrot, zdrot, ?herk and ?her2k applied their real factor through a complex multiplication, producing NaN from infinite components; and ?rotmg could loop forever on infinite input [!3505]IDRS skipped the latest direction when bi-orthogonalizing a new one, which cost IDR(s) its termination within n + n/s products with the matrix: it took several times as many cycles as needed for every shadow-space dimension above 1, and often failed to converge when that dimension was close to the size of the system. It now also restarts when the Krylov space is exhausted, rather than stepping along a direction that is only rounding error. IDRS also reported Success from its recurrence residual alone, which on ill-conditioned systems could be many orders of magnitude below b - A x; it now reports Success only when b - A x meets the tolerance, and restarts from the current iterate when the two disagree. Its default tolerance is now 8 sqrt(n) eps for an n x n matrix rather than eps, the lowest relative residual that b - A x evaluated in floating point can confirm reliably [!3540]NumTraits::RequireInitialization == 0 but is not trivially copyable copied its bytes instead of calling the copy assignment, and growing or shrinking sparse storage of such a scalar relocated its bytes with realloc; both now require std::is_trivially_copyable. SparseMatrix and SparseVector copied every stored entry that an insertion, reserve(), makeCompressed(), a diagonal update, an inner-vector assignment, prune() or the summing of duplicates in setFromTriplets() shifted or relocated; they now move them [#3234, !3537]SparseVector::prune() move-assigned the kept entries in front of the first dropped one onto themselves, which leaves them unspecified: with libstdc++, the value of a scalar holding a std::vector was lost [!3537]Breaking changes:
PaStiXSupport now requires PaStiX 6.x; version 5 is no longer supported. FindPASTIX.cmake uses pkg-config metadata instead of dependency-selection components. Removed the unused FindBLASEXT, FindHWLOC, FindSCOTCH and FindPTSCOTCH modules. Renamed FindMetis.cmake to FindMETIS.cmake to match find_package(METIS) [#2256, !3467]LDLT picks a different pivot order for most inputs, which changes transpositionsP() and the order of vectorD(). A NaN or infinite pivot reports NumericalIssue. A preallocated compute() of a dynamic-size matrix larger than 96 can allocate the packing buffers of its matrix products, as those of LLT, PartialPivLU and BunchKaufman already do [!3423]MatrixBase::makeHouseholder() and makeHouseholderInPlace() follow LAPACK‘s xLARFG on signed zeros and on negligible tails, which changes the factors of HouseholderQR, ColPivHouseholderQR, FullPivHouseholderQR, CompleteOrthogonalDecomposition, the Hessenberg, tridiagonal and bidiagonal reductions and the SVDs and eigensolvers built on them for such inputs. beta takes the sign opposite to the sign bit of the head’s real part: a head of -0.0, or a negative subnormal that a denormals-are-zero comparison reads as zero, gives beta = +norm instead of -norm, and a complex head (-0.0, y) over an exactly zero tail gives beta = +|y| instead of -|y| (a custom scalar type without a copysign overload keeps the comparison with zero). A nonzero tail that is negligible next to the head, that is, whose ratio to the head underflows, gives xLARFG's reflector, tau = 2 and beta = -head, where it gave the identity, tau = 0 and beta = head [!3503]epsfcn for central mode differences was changed to cbrt(NumTraits<Scalar>::epsilon()) (used to be sqrt(NumTraits<Scalar>::epsilon())). The new default should reduce numerical error in most cases.Eigen/QtAlignedMalloc, which replaced Qt 4's qMalloc, qFree and qRealloc with aligned versions on platforms whose malloc is not already sufficiently aligned. Remove the include. [!3413]Deprecations:
ArrayBase::shiftRight<N>() and ArrayBase::shiftLeft<N>(), in favour of arithmeticShiftRight<N>() and logicalShiftLeft<N>() [!2816]Transform conversions from and to Qt's QMatrix and QTransform, which EIGEN_QT_SUPPORT enables, in favor of copying the coefficients explicitly [!3413]Other changes:
?syr2k and ?her2k in Eigen's BLAS library compute only the referenced triangle, without n-by-n temporaries, about twice as fast; unit-stride ?rot, csrot and zdrot are vectorized [!3505]blas_reference (EIGEN_TEST_BLAS_REFERENCE), which compares every routine with netlib's reference BLAS. ctest -L blas runs the BLAS tests [!3505]unsupported/ directory was renamed to contrib/. Existing user code with #include <unsupported/Eigen/...> continues to compile unchanged via forwarding header shims. The CMake subproject label and build-group target were renamed accordingly: Unsupported → Contrib, BuildUnsupported → BuildContrib.demos/ directory, including its two Qt GUI demos, and the EIGEN_BUILD_DEMOS and EIGEN_TEST_NOQT CMake options. The sparse tutorial example no longer needs Qt; it writes a PGM image. [!3413]sizeoverflow test passes when Index is narrower than size_t, as with EIGEN_DEFAULT_DENSE_INDEX_TYPE=int on a 64-bit target [#3414, !3646]A few bug-fixes from the master branch, including
<version> header [#2986]See the full lists of addressed bugs and merge requests for more details.
Eigen 5.0 provides many new features, performance enhancements, and bugfixes throughout Eigen’s core template expression infrastructure and linear algebra facilities. The full set of changes and related issues are too large to list here, but can be accessed via the release milestone %“5.0”.
This is the last major release to support the C++14 language standard. The master branch and subsequent releases will require support for C++17.
This release marks a transition to Semantic Versioning. Previously, Eigen used a WORLD.MAJOR.MINOR scheme. From now on, version numbers will follow the MAJOR.MINOR.PATCH format, indicating breaking changes, new features, and bug fixes, respectively. The WORLD version will remain 3 for this and subsequent releases for posterity. See the table below:
╔═════════╦═════╦═════╗ ║ Release ║ 3.4 ║ 5.0 ║ ╠═════════╬═════╬═════╣ ║ WORLD ║ 3 ║ 3 ║ ║ MAJOR ║ 4 ║ 5 ║ ║ MINOR ║ 0 ║ 0 ║ ║ PATCH ║ - ║ 0 ║ ╚═════════╩═════╩═════╝
-std=c++14 or later. As part of this change, some macros such as EIGEN_HAS_CXX11 have also been removed.Eigen::all and Eigen::last have been moved to Eigen::placeholders::all and Eigen::placeholders::last [!649].../src/.. path) will result in a compilation error [!631].Scalar(1) rather than having all bits set to avoid undefined behavior [!1862].void instead of int for compatibility with other BLAS implementations [!1497].Eigen::aligned_allocator no longer inherits from std::allocator due to a change in the standard and the use of allocate_at_least [!1795].Many bug fixes have been backported from the main branch.
A list of new issues addressed can be found via the 3.4.1 label on GitLab.
Check the git commit history for the full list of changes.
Notice: 3.4.x will be the last major release series of Eigen that will support c++03.
Transform::computeRotationScaling() and Transform::computeScalingRotation() are now more continuous across degeneracies (see !349).initializer_list constructors to Matrix and Array [doc]Vector<Type,Size> and RowVector<Type,Size> aliases [doc].bfloat16.uint32_t and float are available.EIGEN_MAKE_ALIGNED_OPERATOR_NEW.transposeInPlace.colmajor_mat.rowwise().mean().ldexp.sin and cos with huge arguments.pow(x,y).pow, log, sin, cos, arg, pow, log2, complex sqrt, erf, expm1, logp1, logistic, rint, gamma and bessel functions, and more.ndtri, erfc, inverse hyperbolic functions and more)absolute_difference, rint..transpose(), .adjoint() and .solve() APIs.info() method for checking convergence.HouseholderSequence with the identity, as well as the evaluation of a HouseholderSequence to a dense matrix using faster blocked product.KLUSupport module. SuiteSparse must be installed to use this module.SparseCholesky now works with row-major matrices.half__fp16, CUDA/HIP __half, and F16C conversion intrinsics.Matrix or Tensor of bool.uint64_t, int64_t, uint32_t, int16_t, uint16_t, int16_t, int8_t, and uint8_tbfloat16 support when using Eigen::bfloat16float16 when using Eigen::halfstd::complex, half, and bfloat16 vectorization support added.gebp_kernel specific to Altivec, using VSX implementation of the MMA instructions that gain speed improvements up to 4x for matrix-matrix products.__builtin_cpu_supports.std::complex.EIGEN_NO_CUDA.float and std::complex<float> support added.EIGEN_USE_SYCL.TensorDeviceSycl.setConstant(...) methods for preserving one dimension of a matrix by passing in NoChange.setUnit(Index i) for vectors that sets the ‘‘i’’ th coefficient to one and all others to zero.transpose(), adjoint(), conjugate() methods to SelfAdjointView.shiftLeft<N>() and shiftRight<N>() coefficient-wise arithmetic shift functions to Arrays.EIGEN_DEFAULT_L1_CACHE_SIZE, ..., EIGEN_DEFAULT_L3_CACHE_SIZE.EIGEN_ALIGNOF(X) macro for determining alignment of a provided variable.VectorwiseOp by defining a file EIGEN_VECTORWISEOP_PLUGIN (e.g. -DEIGEN_VECTORWISEOP_PLUGIN=my_vectorwise_op_plugins.h).EIGEN_NO_IO.NaNPropagation template argument to control whether NaNs are propagated or suppressed in elementwise min/max and corresponding reductions on Array, Matrix, and Tensor.Eigen::ThreadPool is now separate and more portable, and forms the basis for multi-threading in TensorFlow, for example.nvcc.PADDING_SAME to be consistent with TensorFlow.See the announcement for more details.
Changes since 3.3.8:
EIGEN_DOC_USE_MATHJAX to control this.std::move.Changes since 3.3.7:
CMAKE_INSTALL_PREFIX.std::absis_integral to std::is_integral in c++11 and fix internal::is_integral<size_t/ptrdiff_t> with MSVC 2013 and older.self_adjoint*matrix, triangular*matrix, and triangular^1*matrix with a destination having a non-trivial inner-strideC.noalias() = A*C; with C.innerStride()!=1QuaternionBase::cast for quaternion map and wrapper.numext::[u]int{32,64}_t.SelfAdjointEigenSolver.hdigits10() return an integer.EIGEN_HAS_C99_MATH when using MSVC.Ref<VectorType> from a runtime vector.alloc-size-larger-than= warning in DenseStorage.hChanges since 3.3.7:
std::absmake_coherent for nested expression of constant ADs.is_integral to std::is_integral in c++11 and fix internal::is_integral<size_t/ptrdiff_t> with MSVC 2013 and older.self_adjoint*matrix, triangular*matrix, and triangular^1*matrix with a destination having a non-trivial inner-strideC.noalias() = A*C; with C.innerStride()!=1QuaternionBase::cast for quaternion map and wrapper.numext::[u]int{32,64}_t.EIGEN_HAS_C99_MATH when using MSVC.Ref<VectorType> from a runtime vector.alloc-size-larger-than= warning in DenseStorage.hnumext.geo_alignedbox.Changes since 3.3.6:
Changes since 3.3.5:
__m128) versus scalar types (aka float).Changes since 3.3.4:
General bug fixes:
mat * Transpositions().inverse()) (170914dbbcc3)computeInverseWithCheck for complexes (a2a2c3c86507)NaN in hypot and make it std::complex<> friendly (b18e2d422b09).(s*A).triangularView<UpperUnit>()*B (c24844195d90)std:: to memcpy (32a6db0f8cd5)Map<const Quaternion>::x() (9a266e5118cf)Backends:
MKL_DIRECT_CALL (9df7f3d8e9cd, 3108fbf76708, 292dea7922e7)Diagnostics:
MatrixBase::diagonal(i) (273738ba6f6e)Ref<> (1724dae8b834)Compiler support:
EIGEN_STRONG_INLINE to help MSVC properly inlining small vector calculations (01fb6217335b)-Wfloat-equal warnings by calling std::equal_to (1c4fdad7bd6f)__declspec(nothrow) (3df78d5afc1e)Architecture support:
log, sqrt, rsqrt, non AVX512ER CPUs, apply_rotation_in_the_plane 5c59564bfb92 1939c971a3db c2f9e6cb37e5, 609e425166f6.pcast<> for SSE types even when AVX is enabled. (otherwise float are silently reinterpreted as int instead of being converted)pmin/pmax behave on Altivec/VSX as on x86 regarding NaNs (892c0a79ce93)Documentation:
aligned_allocator (6fc0f2be70a4)info() method (ac2c97edff07)LLT::solveInPlace (51e1aa153957)operator* with CUDA (fa77d713359d)PlainObjectBase::Map (18868228adae)Other general improvements:
Block<Xpr> expressions. In particular, (A+B).col(j) now preserve vectorisation. (9c9e90f6db7e)solveInPlace() to allow passing .transpose(), .block(), etc. (0137ed4f19b6).EIGEN_STRONG_INLINE (6d6e5fcd4356)numeric_limits::min() instead of 1/highest() that might underflow (9ff315024335)stl::*_negate in C++17 (they are deprecated) (3fb42ff7b278)max_digits10 for half (70ac6c923001)Unsupported/unit-tests/cmake/unvisible internals/etc.
__CUDACC_VER__ macro by introducing EIGEN_CUDACC_VER (e7c065ec717b)redux_3 unit testcuda_fp16.h directly in test/main.hSelfAdjointView<...,Mode> causes a static assert since commit d820ab9edc0bmapped_matrix.cppChanges since 3.3.3:
ColPivHouseholderQR.dense * sparse_selfadjoint_view product.stableNorm alignment issue with EIGEN_DONT_ALIGN_STATICALLY.Quaternion.A = C - B*A.cond ? x : -x with x an AutoDiffScalarstd::numeric_limits for Eigen::half and and AutoDiffScalarstd::cout << Array<Array<...>>Changes since 3.3.2:
(sparse*sparse).pruned() when the result is nearly dense.std::size_t/ptrdiff_t to Eigen's namespace.#include <Eigen/Sparse> with mpl2-only.sparse*diagonal*dense with OpenMP.LinPspaced(n,0,n-1) with n==0 or the high<low case.sparse.diagonal() used as a rvalue.CUDACC_VERSelfAdjointEigenSolver<Matrix>(sparse*sparse).Map<>.size_t instead of Index in sefl-adjoint matrix * vectorDiagonalIndex vs Diagonal).Changes since 3.3.1:
transpose, adjoint, conjugate methods to SelfAdjointView (useful to write generic code)HyperPlane::transform maintains a unit normal vector in the Affine case.sparse += sparse.selfadjointView().sparse /=scalar, sparse *=scalar, and col_major_sparse.row() *= scalar..outer() member to iterators, and properly report storage order.A.triangularView() = B*A.sefladjointView()*B.adjoint()mat*vec on some compilers.vec/y to vec*(1/y). The rationale is:SparseLU::solve()-0 vs +0 issue with AltivecChanges since 3.3.0:
&& and || to dense and sparse matrices (only dense arrays were supported)array = matrix_product and mat+=selfadjoint_viewRef<SparseMatrix> and Ref<SparseVector>.SparseMatrix::ReverseInnerIteratorfloat/std::complex<float> for ZVectorEIGEN_MAX_ALIGN_BYTES and EIGEN_MAX_STATIC_ALIGN_BYTES, and reflect in the doc that EIGEN_DONT_ALIGN* are deprecated.For a comprehensive list of change since the 3.2 series, see this page.
Main changes since 3.3-rc2:
For a comprehensive list of change since the 3.2 series, see this page.
Main changes since 3.3-rc1:
X = (X*X.transpose())/scalar with X rectangular (X was resized before the evaluation).(scalar*small).lazyProduct(small)mat.array().sum()Projective * scaling and Projective *= scaling.[0,pi]. This also increases accuracy when q_w is negative.qr.inverse() for column and full pivoting variantsChanges since 3.2.9:
Main fixes and improvements:
std::binder* when C++11 is enabled (those are deprecated).Projective * scaling and Projective *= scaling.__builtin_prefetch for compilers other than GCC, clang, and ICC.For a comprehensive list of change since the 3.2 series, see this page.
Main changes since 3.3-beta2:
New features and improvements:
SparseMatrix::coeffs() method returning a linear view of the non-zeros (for compressed mode only).f(), f(i), f(i,j).* dense products, and enable +=/-= assignment for such products.d?=a-b*c by rewriting them as d?=a; d?=b*c;Doc:
Bug fixes and internal changes:
eigen_assert macropmadd with recent clang versions.install(DIRECTORY ...) commandvector.block(..) expressions.For a comprehensive list of change since the 3.2 series, see this page.
Main changes since 3.3-beta1:
Dense features:
float*expr<multi_prec> without conversion.SelfadjointView::triangularView() and diagonal()Quaternion::UnitRandom() method.EIGEN_USE_BLAS and EIGEN_USE_LAPACKE: any BLAS and LAPACK libraries can now be used as backend (see doc).x(), y(), z(), w() accessorsMap, allows non aligned buffers for buffers smaller than the requested alignment.lpNorm<Infinity> supports empty inputs.VectorwiseOp (e.g., this enables A.rowwise().reverse() = ...)Sparse features:
SparseVector::conservativeResize() methodCholmod::solve to handle any rhs expressions.SparseQR::matrixR is not sorted.Performance improvements:
EIGEN_UNALIGNED_VECTORIZE=0FORCE_INLINEMatrix4f*Vector4f is now vectorized again when using AVX), reductions, linear vs inner traversals.affine*vector products.Quaternion::slerp.Doc:
Misc improvements:
EIGEN_MAX_CPP_VER option to limit the C++ version to be used, as well as fine grained options to control individual language features.NumTraits now exposes a digits10 function making internal::significant_decimals_impl deprecated.std::list and std::deque specializations such that our aligned allocator is automatically activated only when the user did not specified an allocator (or specified the default std::allocator).EIGEN_STACK_ALLOCATION_LIMIT is too smallposix_memalign, _mm_malloc, and _aligned_malloc special paths.[U]IntPtr types to be used for casting pointers to integers.NumTraits now exposes infinity()EvalBeforeNestingBit is now deprecated.Array<string>boost::multiprecision::number<> type). All dense decompositions are successfully tested.Most visible fixes:
x=y+A*x (aliasing issue)_mm256_set_m128 and _mm256_setr_m128 in AVX support__GXX_EXPERIMENTAL_CXX0X__ to detect C++11 support.const_cast.ceil() function.SparseMatrix::valuePtr and innerIndexPtr properly return null for empty matricesvreinterpretq_u64_f64 (NEON)__ARM_FEATURE_FMA on Clang/ARMAutoDiffScalarparse.cast<>().transpose().AutoDiffScalar.Derived::Options in MatrixFunctions.(dense*dense).sparseView().SparseMatrix::sum() overload for un-compressed modeMap<SparseMatrix>::coeffRef__builtin_prefetch .pow() for AutoDiffScalar with custom nested scalar type.Changes since 3.2.8:
Main fixes and improvements:
makeHouseholdervector.homogeneous().asDiagonal()SparseMatrix::sum() overload for un-compressed modemat = perm * mat)A*(A*A)^Taligned_allocator c++11 compatible (backported from 3.3)abs2 (backported from 3.3)valuePtr and innerIndexPtr properly return null for empty sparse matrices.memcpy/memmove for empty inputs.Others:
Changes since 3.2.7:
Main fixes and improvements:
FullPivLU::solve use rank() instead of nonzeroPivots().EIGEN_MAPBASE_PLUGINEIGEN_MAKE_ALIGNED_OPERATOR_NEW(A*B).maxCoeff(i) and similar.std::list and std::deque specializations such that our aligned allocator is automatically activatived only when the user did not specified an allocator (or specified the default std::allocator).Others:
sparse_column_major.row(i).nonZeros() (it now produces a compilation error)__GXX_EXPERIMENTAL_CXX0X__ to detect C++11 supportoperator*(MatrixBase)For a comprehensive list of change since the 3.2 series, see this page.
Main changes since 3.3-alpha1:
Dense features:
LU::transpose().solve() and LU::adjoint().solve() API.Array::rsqrt() method as a more efficient shorcut for sqrt().inverse().Array::sign() method for real and complexes.lgamma, erf, and erfc functions for arrays.lpNorm().Rotation2D::operator=(Matrix2x2).permutation * homogenous.EIGEN_MAPBASE_PLUGIN and EIGEN_QUATERNION_PLUGIN.Sparse features:
setFromTriplets API to allow passing a functor object controlling how to collapse duplicated entries.dense.cwiseProduct(sparse), thus enabling (dense*sparse).diagonal() expressions.Ref<SparseVector>.sparse<complex> operations.UF_long by SuiteSparse_long.Ref<SparseMatrix> more versatile.Performance improvements:
D.nolias() *= C + A*B.Block<SparseMatrix> by using Ref and avoiding useless updates in non-compressed mode. This make row-by-row filling of a row-major sparse matrix very efficient.Misc improvements:
isfinite/isnan/isinf in fast-math mode.Most visible fixes:
SparseMatrix::insert/coeffRef for non-empty compressed matrix.AlignedBox::sample for runtime dimension.complex<double> multiplication.Changes since 3.2.6:
Main fixes and improvements:
dense.cwiseProduct(sparse).(dense*sparse).diagonal().IterativeLinearSolvers module compatible with MPL2-only mode by defaulting to COLAMDOrdering and NaturalOrdering for ILUT and ILLT respectively.operator/=(Scalar) now performs a true division (instead of mat*(1/s))mat * (1/s))setIdenity for non-compressed sparse-matrixOthers:
SparseMatrix<complex> operations. This avoids real to complex conversions, and also fixes a compilation issue with MSVC.DenseStorage::operator= from devel branch.CMAKE_INSTALL_PREFIX prefix to conform to cmake install's DESTINATION parameter.Changes since 3.2.5:
EIGEN_DEFAULT_TO_ROW_MAJOR (#1053), and for empty (#1026) and some structurally rank deficient matrices (#792)AlignedBox::sample() for Dynamic dimensionpredux_max<Packet4i> for NEONEIGEN_DEFAULT_DENSE_INDEX_TYPESee the announcement.
Changes since 3.2.4:
Changes with main impact:
ConjugateGradients::solvePermutationMatrix::determinant methodSparseLU::signDeterminant() method, and add a SparseLU::determinant() methodNumerical robustness improvements:
Quaternion::angularDistanceOther changes:
EIGEN_NO_AUTOMATIC_RESIZINGChanges since 3.2.3:
first_aligned.Changes since 3.2.2:
Core:
Mx0 * 0xN matrix products.exp(NaN), log(NaN), sqrt(NaN) and sqrt(-1).Dense solvers:
compute().Sparse:
compute(), add support for generic expressions as input, and fix extraction of the L and U factors (#911).SparseMatrix::block for const matrices (the generic path was used).SparseQR::rank for a completely empty matrix.SparseQR for row-major inputs.SparseLU::absDeterminant and add respective unit test.Geometry:
Hyperplane::Through(a,b,c) when points are aligned or identical.OS, build system and doc:
Changes since 3.2.1:
Core:
Ref<MatrixXf> accepts a RowVectorXf which can be seen as a degenerate MatrixXf(1,N)EIGEN_STACK_ALLOCATION_LIMIT: Raise its default value to 128KB, make use of it to assert on maximal fixed size object, and allows it to be 0 to mean “no limit”.CommaInitializer produced wrong assertions in absence of Return-Value-Optimization.Dense solvers:
rank() method with threshold control to JacobiSVD, and make solve uses it to return the minimal norm solution for rank-deficient problems.ColPivHouseholderQR::rank().EIGEN_DEFAULT_TO_ROW_MAJOR in BlockHouseholder.Sparse:
dense * sparse and sparse * dense outer products and detect outer products from either the lhs or rhs.CompressedStorage::resize, fix implicit conversions from int/longint to float/double, and fix set_from_triplets temporary matrix type.smart_copy instead of bitwise memcpy in CompressedStorage.Geometry:
umeyama()Quaternion::setFromTwoVectors()Quaternion::angularDistance.OS, build system and doc:
!defined(_WIN32_WCE)) analog to alloc and free implementation.char* to int* conversion.dm2 = sm1 + dm1 is not possibleChanges since 3.2.0:
cwiseMin() and cwiseMax() on maps.conservativeResize() on vectors.EIGEN_FAST_MATH is disabled..all() and .any() for zero-sized objectsFullPivHouseholderQR return least-square solution if there is no exact solution.fullPivHouseholderQR for rectangular matrices.LDLT::isPositiveDefinite() for semi-definite matrices.stableNorm().isCompressed to MappedSparseMatrix for compatibility.operator< in setFromTriplets().alloca() is 16-byte aligned on Windows.Changes since 3.1.3:
transposeInPlace() for Array expressions.data() member in Array and Matrix wrappers.Changes since 3.0.6:
Map<Quaternion>.Major new features and optimizations since 3.1:
Ref<> class allowing to write non templated function taking various kind of Eigen dense objects without copies..block<.,.>() functions.JacobiSVD::solve().Eigen 3.2 represents about 600 commits since Eigen 3.1.
Changes since 3.2-rc1:
DenseBase::isFinite() to allFinite() to avoid a future naming collision.Main changes since 3.2-beta1:
New features:
hasNaN and isFinite members..block().scalar_product_traits.SparseQR::matrixQ() to a SparseMatrix.Accuracy and performance:
Bug fixes:
HouseholderSequence::conjugate() and ::adjoint().SparseMatrix::conservativeResize() when one dimension is null.transposeInpPlace for arrays.handmade_aligned_realloc.posix_memalign with mingw.-O3 or -fipa-cp-clone options.diagonal_matrix * sparse_matrix * diagonal_matrix.Others:
EIGEN_ENABLE_LAPACK_TESTS is ON.Block<SparseMatrix> is now allowed on non-compressed matrices.Changes since 3.1.2:
EIGEN_DEFAULT_DENSE_INDEX_TYPE.abs()..real() or .imag().handmade_aligned_realloc (affected conservativeResize()).log(0) with SSE.Map<Quaternion>.Main changes since 3.1:
Dense modules
Ref<> class allowing to write non templated function taking various kind of Eigen dense objects without copies.Sparse modules
Support to external libraries
Misc
EIGEN_INITIALIZE_MATRICES_BY_NAN to help debugging.Changes since 3.1.1:
__cpuidex on architectures different that x86 or x86-64 with MSVC.AlignedBox::dim() was wrong for dynamic dimensions.mat*(1/scalar) for non integer types).resize() function from Array/Matrix wrappers to the nested expression such that mat.array().resize(a,b) is now allowed.aligned_malloc function on this platform.dense=sparse*diagonal products.m.array().min(scalar) and m.array().max(scalar).Changes since 3.1.0:
EIGEN_MPL2_ONLY build option to generate compiler errors when including non-MPL2 modulesisometry * scaling compilation errorChanges since 3.0.5:
ProductBase::coeff().exp() now returns +inf when overflow occurs (SSE)* projectivesomedensematrix.llt().matrixL().transpose()Block::m_outerStrideMajor changes between Eigen 3.0 and Eigen 3.1:
*, /, *=, /= ** New coefficient-wise operators: &&, ||, min(Scalar), max(Scalar), pow, operator/(Scalar,ArrayBase)SelfAdjointEigenSolver::computeDirect() function for fast eigen-decomposition through closed-form formulas (only for 2x2 and 3x3 real matrices)Eigen 3.1 represents about 600 commits since Eigen 3.0.
Changes since 3.1.0-rc1:
JacobiSVDRealSchur failed on a zero matrixMain changes since 3.1.0-beta1:
initParallel().SimplicialLLT and SimplicialLDLT now factorizes P A P^-1 (instead of P^-1 A P).exp operator returns +inf when overflow occursMain changes since 3.1.0-alpha2:
SimplicialLLt and SimplicialLDLt are now renamed SimplicialLLT and SimplicialLDLT for consistency with the other modules.operator/(Scalar,ArrayBase) and coefficient-wise pow operator.ProductBase::coeff()aligned_allocatorLinSpace: add a missing variant, and fix the size=1 caseSparseMatrixBase::twistedBy, handle non symmetric permutations)CholmodDecomposition now has explicit variants: CholmodSupernodalLLT, CholmodSimplicialLLT, CholmodSimplicialLDLTsparse * dense productsTransform<> operations by better preserving the alignment status.Rotation2D::operator*=Quaternion::FromTwoVectors() static constructor* projectiveChanges since 3.0.4:
Map expressionsRotation2D::operator*=EigenSolverrankUpdate() in quick reference guideMain changes since 3.0.1-alpha1:
SparseMatrix::setFromTriplets())SimplicialCholeskyBase::setShift())sparse*sparse productParametrizedLine::intersectionPoint() and intersectionParam() functions-DEIGEN_NO_CPUID) and other asm directivesMain changes since 3.0:
SparseCore module equivalent to the old Sparse module, the Sparse module is now a super module including all sparse-related modulesSparseMatrix class is now more versatile and supports an uncompressed mode for fast element insertionSparseMatrix class now offer a unique and simplified API to insert elementsDynamicSparseMatrix has been deprecated (moved into unsupported/SparseExtra)sparse * sparse matrix product which is also used by defaultSparseCholesky module featuring the SimplicialLLT and SimplicialLDLT built-in solversIterativeLinearSolvers module featuring a conjugate gradient and stabilized bi-conjugate gradient iterative solvers with a basic Jacobi preconditionerSelfAdjointEigenSolver::computeDirect() function for fast eigen-decomposition through closed-form formulas (only for 2x2 and 3x3 real matrices)LLT::rankUpdate() function supporting both updates and down-dates&& and ||*, /, *=, and /=.Changes since 3.0.3:
QuaternionBase::castChanges since 2.0.16:
aligned_allocator: the allocate method should take a void pointerChanges since 3.0.2:
matrix1 * matrix2 * scalar1 * scalar2.Changes since 3.0.1:
Windows.h: protect min/max calls from macros having the same name (no need to #undef min/max anymore).Changes since 3.0.0:
EigenSolver: normalize the eigen vectors.Changes since 2.0.15:
part<SelfAdjoint>.Released at the meeting.
See the Eigen 3.0 release notes.
Only change since 3.0-rc1:
Main changes since 3.0-beta4:
EIGEN_RUNTIME_NO_MALLOC option and new set_is_malloc_allowed() option to finely control where dynamic memory allocation is allowed. Useful for unit-testing of functions that must not cause dynamic memory allocations.EIGEN_DONT_ALIGN or EIGEN_DONT_ALIGN_STATICALLY (#213 and friends).EIGEN_DONT_ALIGN and EIGEN_DONT_ALIGN_STATICALLY are now covered by unit tests.computationOptions) (#206)Main changes since 3.0-beta3:
assert() macrocomplex<double>)The biggest news is that the API is now 100% stable.
Main changes since 3.0-beta2:
ei_ prefix by internal:: namespace. For example, ei_cos(x) becomes internal::cos(x).PlanarRotation -> JacobiRotationDenseStorageBase -> PlainObjectBaseEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET must be defined to use Eigen/Sparserandom<interger type>() now spans over range of width RAND_MAXjacobiSvd() methodEIGEN2_SUPPORTMain changes since 3.0-beta1:
std::complex<> with SSE, AltiVec and NEON.real * complex matrix products with vectorization.middleRows(), middleCols(), TriangularMatrix::conjugate()m>n, use of rank, etc.JacobiSVD can be used meanwhile).Changes since 2.0.14:
See the announcement.
Changes since 2.0.13:
Matrix<double,Dynamic,Dynamic,AutoAlign,5,5>.Changes since 2.0.12:
norm() and squaredNorm() on complex types do not return real typesstd:: in front of a lot of things such as size_t, check whether the math library needs to be linked to explicitly.isPositiveDefinite() method is now always returning true, but it was conceptually broken anyway, since a non-pivoting LDLT decomposition can't know that.ldlt() on expressions.Changes since 2.0.11:
EIGEN_DEFAULT_TO_ROW_MAJOR is fully supported and tested.Matrix<float,3,Dynamic>(3,2)EIGEN_DONT_ALIGN: now it really disables vectorization (was giving a #error unless you also used EIGEN_DONT_VECTORIZE).computeInverse() on expressions.Changes since 2.0.10:
Changes since 2.0.9:
MatrixBase::nonZeros() was recursing infinitelyEIGEN_INITIALIZE_MATRICES_BY_ZEROChanges since 2.0.8:
NewStdVector header that was introduced in 2.0.6.Changes since 2.0.7:
Changes since 2.0.6:
QVector on Windows 32-bit. By Hauke Heibel.reallocateSparse function was half codedSparseMatrix::resize() not correctly initializing by zeroSparseMatrix::resize() when outerSize==0. By Hauke Heibel.Memory.h with the devel branch. This is cleaner and fixes a warning. The choice of system aligned malloc function may be affected by this change.Changes since 2.0.5:
swap().Transform::Identity() as mentioned in the tutorial.EIGEN_DONT_ALIGN (backport from devel branch).StdVector header as NewStdVector. You may also #define EIGEN_USE_NEW_STDVECTOR to make StdVector use it automatically. However, by default it isn’t used by StdVector, to preserve compatibility.EIGEN_RESTRICT and add EIGEN_DONT_USE_RESTRICT_KEYWORDei_aligned_malloc; fixed by backporting the body from the devel branch; may result in a different choice of system aligned malloc function.Changes since 2.0.4:
LU::solve() crashed when called on the LU decomposition of a zero matrixEIGEN_STACK_ALLOCATION_LIMIT was too high, resulting in stack overflow for a user. Now it is set as in the devel branch.StdVector header didn't work with GCC 4.1. (Bug #41)Rotation2D::operator*= (Bug #36)#error message about the #including orderEIGEN_TRANSFORM_PLUGIN allowing to customize the Transform classChanges since 2.0.3:
ei_atan2 function. Thanks to Manuel Yguel.ei_atan2 instead of using std::atan2 directly.toQTransform() and toQMatrix(). Thanks to Anthony Truchet.a *= b and a = a*b when a has to be resized.ei_pow. for integers for gcc >= 4.3Quaternion::setFromTwoVectors()Changes since 2.0.2:
Changes since 2.0.1:
linearRegression() compilation, actually it is reimplemented using the better fitHyperplane() which does total least-squares.setZero() etc... variants taking size parameters and resizing. These were mentioned in the tutorial but weren't implemented.posix_memalign platform check. This fixes portability issues. Thanks to Ross Smith.Changes since 2.0.0:
aligned_allocator (thanks to Hauke Heibel)First public release.