diff --git a/otherlibs/eigen3/Eigen/Cholesky b/otherlibs/eigen3/Eigen/Cholesky
index ccbf6fe72d..f727f5d89c 100644
--- a/otherlibs/eigen3/Eigen/Cholesky
+++ b/otherlibs/eigen3/Eigen/Cholesky
@@ -5,8 +5,7 @@
#include "src/Core/util/DisableStupidWarnings.h"
-/** \defgroup Cholesky_Module Cholesky module
- * \ingroup eigen_grp
+/** \defgroup Cholesky_Module Cholesky module
*
*
*
diff --git a/otherlibs/eigen3/Eigen/CholmodSupport b/otherlibs/eigen3/Eigen/CholmodSupport
index b83c594e52..745b884e74 100644
--- a/otherlibs/eigen3/Eigen/CholmodSupport
+++ b/otherlibs/eigen3/Eigen/CholmodSupport
@@ -10,8 +10,7 @@ extern "C" {
}
/** \ingroup Support_modules
- * \defgroup CholmodSupport_Module CholmodSupport module
- * \ingroup eigen_grp
+ * \defgroup CholmodSupport_Module CholmodSupport module
*
* This module provides an interface to the Cholmod library which is part of the suitesparse package.
* It provides the two following main factorization classes:
diff --git a/otherlibs/eigen3/Eigen/Core b/otherlibs/eigen3/Eigen/Core
index fb0df47e4d..9131cc3fc9 100644
--- a/otherlibs/eigen3/Eigen/Core
+++ b/otherlibs/eigen3/Eigen/Core
@@ -238,9 +238,7 @@ using std::size_t;
// gcc 4.6.0 wants std:: for ptrdiff_t
using std::ptrdiff_t;
-/** \defgroup eigen_grp The Eigen3 library
- \defgroup Core_Module Core module
- * \ingroup eigen_grp
+/** \defgroup Core_Module Core module
* This is the main module of Eigen providing dense matrix and vector support
* (both fixed and dynamic size) with all the features corresponding to a BLAS library
* and much more...
diff --git a/otherlibs/eigen3/Eigen/Eigen2Support b/otherlibs/eigen3/Eigen/Eigen2Support
index fb33ffa1a5..6aa009d209 100644
--- a/otherlibs/eigen3/Eigen/Eigen2Support
+++ b/otherlibs/eigen3/Eigen/Eigen2Support
@@ -14,13 +14,25 @@
#error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header
#endif
+#ifndef EIGEN_NO_EIGEN2_DEPRECATED_WARNING
+
+#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
+#warning "Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)"
+#else
+#pragma message ("Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)")
+#endif
+
+#endif // EIGEN_NO_EIGEN2_DEPRECATED_WARNING
+
#include "src/Core/util/DisableStupidWarnings.h"
/** \ingroup Support_modules
- * \defgroup Eigen2Support_Module Eigen2 support module
- * \ingroup eigen_grp
- * This module provides a couple of deprecated functions improving the compatibility with Eigen2.
+ * \defgroup Eigen2Support_Module Eigen2 support module
+ *
+ * \warning Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3.
*
+ * This module provides a couple of deprecated functions improving the compatibility with Eigen2.
+ *
* To use it, define EIGEN2_SUPPORT before including any Eigen header
* \code
* #define EIGEN2_SUPPORT
diff --git a/otherlibs/eigen3/Eigen/Eigenvalues b/otherlibs/eigen3/Eigen/Eigenvalues
index fbdc9d3fb1..53c5a73a27 100644
--- a/otherlibs/eigen3/Eigen/Eigenvalues
+++ b/otherlibs/eigen3/Eigen/Eigenvalues
@@ -11,8 +11,7 @@
#include "LU"
#include "Geometry"
-/** \defgroup Eigenvalues_Module Eigenvalues module
- * \ingroup eigen_grp
+/** \defgroup Eigenvalues_Module Eigenvalues module
*
*
*
diff --git a/otherlibs/eigen3/Eigen/Geometry b/otherlibs/eigen3/Eigen/Geometry
index d458501ffc..efd9d4504c 100644
--- a/otherlibs/eigen3/Eigen/Geometry
+++ b/otherlibs/eigen3/Eigen/Geometry
@@ -13,8 +13,7 @@
#define M_PI 3.14159265358979323846
#endif
-/** \defgroup Geometry_Module Geometry module
- * \ingroup eigen_grp
+/** \defgroup Geometry_Module Geometry module
*
*
*
diff --git a/otherlibs/eigen3/Eigen/Householder b/otherlibs/eigen3/Eigen/Householder
index 9266bc43fb..6e348db5c4 100644
--- a/otherlibs/eigen3/Eigen/Householder
+++ b/otherlibs/eigen3/Eigen/Householder
@@ -5,8 +5,7 @@
#include "src/Core/util/DisableStupidWarnings.h"
-/** \defgroup Householder_Module Householder module
- * \ingroup eigen_grp
+/** \defgroup Householder_Module Householder module
* This module provides Householder transformations.
*
* \code
diff --git a/otherlibs/eigen3/Eigen/IterativeLinearSolvers b/otherlibs/eigen3/Eigen/IterativeLinearSolvers
index 3b50496b3c..0f4159dc19 100644
--- a/otherlibs/eigen3/Eigen/IterativeLinearSolvers
+++ b/otherlibs/eigen3/Eigen/IterativeLinearSolvers
@@ -7,8 +7,7 @@
#include "src/Core/util/DisableStupidWarnings.h"
/**
- * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module
- * \ingroup eigen_grp
+ * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module
*
* This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse.
* Those solvers are accessible via the following classes:
diff --git a/otherlibs/eigen3/Eigen/Jacobi b/otherlibs/eigen3/Eigen/Jacobi
index 4031dfea12..ba8a4dc36a 100644
--- a/otherlibs/eigen3/Eigen/Jacobi
+++ b/otherlibs/eigen3/Eigen/Jacobi
@@ -5,8 +5,7 @@
#include "src/Core/util/DisableStupidWarnings.h"
-/** \defgroup Jacobi_Module Jacobi module
- * \ingroup eigen_grp
+/** \defgroup Jacobi_Module Jacobi module
* This module provides Jacobi and Givens rotations.
*
* \code
diff --git a/otherlibs/eigen3/Eigen/LU b/otherlibs/eigen3/Eigen/LU
index a8ed48abb0..db57955044 100644
--- a/otherlibs/eigen3/Eigen/LU
+++ b/otherlibs/eigen3/Eigen/LU
@@ -5,8 +5,7 @@
#include "src/Core/util/DisableStupidWarnings.h"
-/** \defgroup LU_Module LU module
- * \ingroup eigen_grp
+/** \defgroup LU_Module LU module
* This module includes %LU decomposition and related notions such as matrix inversion and determinant.
* This module defines the following MatrixBase methods:
* - MatrixBase::inverse()
diff --git a/otherlibs/eigen3/Eigen/LeastSquares b/otherlibs/eigen3/Eigen/LeastSquares
index 300f2eba9e..35137c25db 100644
--- a/otherlibs/eigen3/Eigen/LeastSquares
+++ b/otherlibs/eigen3/Eigen/LeastSquares
@@ -15,8 +15,7 @@
#include "Eigenvalues"
#include "Geometry"
-/** \defgroup LeastSquares_Module LeastSquares module
- * \ingroup eigen_grp
+/** \defgroup LeastSquares_Module LeastSquares module
* This module provides linear regression and related features.
*
* \code
diff --git a/otherlibs/eigen3/Eigen/MetisSupport b/otherlibs/eigen3/Eigen/MetisSupport
index e29829f11f..6a113f7a87 100644
--- a/otherlibs/eigen3/Eigen/MetisSupport
+++ b/otherlibs/eigen3/Eigen/MetisSupport
@@ -11,8 +11,7 @@ extern "C" {
/** \ingroup Support_modules
- * \defgroup MetisSupport_Module MetisSupport module
- * \ingroup eigen_grp
+ * \defgroup MetisSupport_Module MetisSupport module
*
* \code
* #include
diff --git a/otherlibs/eigen3/Eigen/OrderingMethods b/otherlibs/eigen3/Eigen/OrderingMethods
index 0af901e625..7c0f1fffff 100644
--- a/otherlibs/eigen3/Eigen/OrderingMethods
+++ b/otherlibs/eigen3/Eigen/OrderingMethods
@@ -6,8 +6,7 @@
#include "src/Core/util/DisableStupidWarnings.h"
/**
- * \defgroup OrderingMethods_Module OrderingMethods module
- * \ingroup eigen_grp
+ * \defgroup OrderingMethods_Module OrderingMethods module
*
* This module is currently for internal use only
*
diff --git a/otherlibs/eigen3/Eigen/PaStiXSupport b/otherlibs/eigen3/Eigen/PaStiXSupport
index 455bf22e7e..7c616ee5ea 100644
--- a/otherlibs/eigen3/Eigen/PaStiXSupport
+++ b/otherlibs/eigen3/Eigen/PaStiXSupport
@@ -16,8 +16,7 @@ extern "C" {
#endif
/** \ingroup Support_modules
- * \defgroup PaStiXSupport_Module PaStiXSupport module
- * \ingroup eigen_grp
+ * \defgroup PaStiXSupport_Module PaStiXSupport module
*
* This module provides an interface to the PaSTiX library.
* PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver.
diff --git a/otherlibs/eigen3/Eigen/PardisoSupport b/otherlibs/eigen3/Eigen/PardisoSupport
index a5a586e353..99330ce7a7 100644
--- a/otherlibs/eigen3/Eigen/PardisoSupport
+++ b/otherlibs/eigen3/Eigen/PardisoSupport
@@ -10,8 +10,7 @@
#include
/** \ingroup Support_modules
- * \defgroup PardisoSupport_Module PardisoSupport module
- * \ingroup eigen_grp
+ * \defgroup PardisoSupport_Module PardisoSupport module
*
* This module brings support for the Intel(R) MKL PARDISO direct sparse solvers.
*
diff --git a/otherlibs/eigen3/Eigen/QR b/otherlibs/eigen3/Eigen/QR
index df21c36a09..ac5b026935 100644
--- a/otherlibs/eigen3/Eigen/QR
+++ b/otherlibs/eigen3/Eigen/QR
@@ -9,8 +9,7 @@
#include "Jacobi"
#include "Householder"
-/** \defgroup QR_Module QR module
- * \ingroup eigen_grp
+/** \defgroup QR_Module QR module
*
*
*
diff --git a/otherlibs/eigen3/Eigen/SPQRSupport b/otherlibs/eigen3/Eigen/SPQRSupport
index c1cc0c6529..77016442ee 100644
--- a/otherlibs/eigen3/Eigen/SPQRSupport
+++ b/otherlibs/eigen3/Eigen/SPQRSupport
@@ -8,8 +8,7 @@
#include "SuiteSparseQR.hpp"
/** \ingroup Support_modules
- * \defgroup SPQRSupport_Module SuiteSparseQR module
- * \ingroup eigen_grp
+ * \defgroup SPQRSupport_Module SuiteSparseQR module
*
* This module provides an interface to the SPQR library, which is part of the suitesparse package.
*
diff --git a/otherlibs/eigen3/Eigen/SVD b/otherlibs/eigen3/Eigen/SVD
index 96d832c999..fd310017ad 100644
--- a/otherlibs/eigen3/Eigen/SVD
+++ b/otherlibs/eigen3/Eigen/SVD
@@ -7,8 +7,7 @@
#include "src/Core/util/DisableStupidWarnings.h"
-/** \defgroup SVD_Module SVD module
- * \ingroup eigen_grp
+/** \defgroup SVD_Module SVD module
*
*
*
diff --git a/otherlibs/eigen3/Eigen/Sparse b/otherlibs/eigen3/Eigen/Sparse
index 7865605b70..7cc9c09133 100644
--- a/otherlibs/eigen3/Eigen/Sparse
+++ b/otherlibs/eigen3/Eigen/Sparse
@@ -1,8 +1,7 @@
#ifndef EIGEN_SPARSE_MODULE_H
#define EIGEN_SPARSE_MODULE_H
-/** \defgroup Sparse_Module Sparse meta-module
- * \ingroup eigen_grp
+/** \defgroup Sparse_Module Sparse meta-module
*
* Meta-module including all related modules:
* - \ref SparseCore_Module
diff --git a/otherlibs/eigen3/Eigen/SparseCholesky b/otherlibs/eigen3/Eigen/SparseCholesky
index 7220d17bf8..9f5056aa1a 100644
--- a/otherlibs/eigen3/Eigen/SparseCholesky
+++ b/otherlibs/eigen3/Eigen/SparseCholesky
@@ -16,8 +16,7 @@
#include "src/Core/util/DisableStupidWarnings.h"
/**
- * \defgroup SparseCholesky_Module SparseCholesky module
- * \ingroup eigen_grp
+ * \defgroup SparseCholesky_Module SparseCholesky module
*
* This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices.
* Those decompositions are accessible via the following classes:
diff --git a/otherlibs/eigen3/Eigen/SparseCore b/otherlibs/eigen3/Eigen/SparseCore
index a2d4b2fea7..9b5be5e15a 100644
--- a/otherlibs/eigen3/Eigen/SparseCore
+++ b/otherlibs/eigen3/Eigen/SparseCore
@@ -12,8 +12,7 @@
#include
/**
- * \defgroup SparseCore_Module SparseCore module
- * \ingroup eigen_grp
+ * \defgroup SparseCore_Module SparseCore module
*
* This module provides a sparse matrix representation, and basic associatd matrix manipulations
* and operations.
diff --git a/otherlibs/eigen3/Eigen/SparseLU b/otherlibs/eigen3/Eigen/SparseLU
index df117ca492..8527a49bd8 100644
--- a/otherlibs/eigen3/Eigen/SparseLU
+++ b/otherlibs/eigen3/Eigen/SparseLU
@@ -14,8 +14,7 @@
#include "SparseCore"
/**
- * \defgroup SparseLU_Module SparseLU module
- * \ingroup eigen_grp
+ * \defgroup SparseLU_Module SparseLU module
* This module defines a supernodal factorization of general sparse matrices.
* The code is fully optimized for supernode-panel updates with specialized kernels.
* Please, see the documentation of the SparseLU class for more details.
diff --git a/otherlibs/eigen3/Eigen/SparseQR b/otherlibs/eigen3/Eigen/SparseQR
index 62e46b9dca..4ee42065ee 100644
--- a/otherlibs/eigen3/Eigen/SparseQR
+++ b/otherlibs/eigen3/Eigen/SparseQR
@@ -5,8 +5,7 @@
#include "OrderingMethods"
#include "src/Core/util/DisableStupidWarnings.h"
-/** \defgroup SparseQR_Module SparseQR module
- * \ingroup eigen_grp
+/** \defgroup SparseQR_Module SparseQR module
* \brief Provides QR decomposition for sparse matrices
*
* This module provides a simplicial version of the left-looking Sparse QR decomposition.
diff --git a/otherlibs/eigen3/Eigen/SuperLUSupport b/otherlibs/eigen3/Eigen/SuperLUSupport
index 81a225b8a4..575e14fbc2 100644
--- a/otherlibs/eigen3/Eigen/SuperLUSupport
+++ b/otherlibs/eigen3/Eigen/SuperLUSupport
@@ -29,8 +29,7 @@ typedef int int_t;
namespace Eigen { struct SluMatrix; }
/** \ingroup Support_modules
- * \defgroup SuperLUSupport_Module SuperLUSupport module
- * \ingroup eigen_grp
+ * \defgroup SuperLUSupport_Module SuperLUSupport module
*
* This module provides an interface to the SuperLU library.
* It provides the following factorization class:
diff --git a/otherlibs/eigen3/Eigen/UmfPackSupport b/otherlibs/eigen3/Eigen/UmfPackSupport
index 4511b8bae6..984f64a841 100644
--- a/otherlibs/eigen3/Eigen/UmfPackSupport
+++ b/otherlibs/eigen3/Eigen/UmfPackSupport
@@ -10,8 +10,7 @@ extern "C" {
}
/** \ingroup Support_modules
- * \defgroup UmfPackSupport_Module UmfPackSupport module
- * \ingroup eigen_grp
+ * \defgroup UmfPackSupport_Module UmfPackSupport module
*
* This module provides an interface to the UmfPack library which is part of the suitesparse package.
* It provides the following factorization class:
diff --git a/otherlibs/eigen3/Eigen/src/Cholesky/LDLT.h b/otherlibs/eigen3/Eigen/src/Cholesky/LDLT.h
index d19cb3968d..d026418f8a 100644
--- a/otherlibs/eigen3/Eigen/src/Cholesky/LDLT.h
+++ b/otherlibs/eigen3/Eigen/src/Cholesky/LDLT.h
@@ -16,7 +16,10 @@
namespace Eigen {
namespace internal {
-template struct LDLT_Traits;
+ template struct LDLT_Traits;
+
+ // PositiveSemiDef means positive semi-definite and non-zero; same for NegativeSemiDef
+ enum SignMatrix { PositiveSemiDef, NegativeSemiDef, ZeroSign, Indefinite };
}
/** \ingroup Cholesky_Module
@@ -69,7 +72,12 @@ template class LDLT
* The default constructor is useful in cases in which the user intends to
* perform decompositions via LDLT::compute(const MatrixType&).
*/
- LDLT() : m_matrix(), m_transpositions(), m_isInitialized(false) {}
+ LDLT()
+ : m_matrix(),
+ m_transpositions(),
+ m_sign(internal::ZeroSign),
+ m_isInitialized(false)
+ {}
/** \brief Default Constructor with memory preallocation
*
@@ -81,6 +89,7 @@ template class LDLT
: m_matrix(size, size),
m_transpositions(size),
m_temporary(size),
+ m_sign(internal::ZeroSign),
m_isInitialized(false)
{}
@@ -93,6 +102,7 @@ template class LDLT
: m_matrix(matrix.rows(), matrix.cols()),
m_transpositions(matrix.rows()),
m_temporary(matrix.rows()),
+ m_sign(internal::ZeroSign),
m_isInitialized(false)
{
compute(matrix);
@@ -139,7 +149,7 @@ template class LDLT
inline bool isPositive() const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
- return m_sign == 1;
+ return m_sign == internal::PositiveSemiDef || m_sign == internal::ZeroSign;
}
#ifdef EIGEN2_SUPPORT
@@ -153,7 +163,7 @@ template class LDLT
inline bool isNegative(void) const
{
eigen_assert(m_isInitialized && "LDLT is not initialized.");
- return m_sign == -1;
+ return m_sign == internal::NegativeSemiDef || m_sign == internal::ZeroSign;
}
/** \returns a solution x of \f$ A x = b \f$ using the current decomposition of A.
@@ -235,7 +245,7 @@ template class LDLT
MatrixType m_matrix;
TranspositionType m_transpositions;
TmpMatrixType m_temporary;
- int m_sign;
+ internal::SignMatrix m_sign;
bool m_isInitialized;
};
@@ -246,7 +256,7 @@ template struct ldlt_inplace;
template<> struct ldlt_inplace
{
template
- static bool unblocked(MatrixType& mat, TranspositionType& transpositions, Workspace& temp, int* sign=0)
+ static bool unblocked(MatrixType& mat, TranspositionType& transpositions, Workspace& temp, SignMatrix& sign)
{
using std::abs;
typedef typename MatrixType::Scalar Scalar;
@@ -258,8 +268,9 @@ template<> struct ldlt_inplace
if (size <= 1)
{
transpositions.setIdentity();
- if(sign)
- *sign = numext::real(mat.coeff(0,0))>0 ? 1:-1;
+ if (numext::real(mat.coeff(0,0)) > 0) sign = PositiveSemiDef;
+ else if (numext::real(mat.coeff(0,0)) < 0) sign = NegativeSemiDef;
+ else sign = ZeroSign;
return true;
}
@@ -284,7 +295,6 @@ template<> struct ldlt_inplace
if(biggest_in_corner < cutoff)
{
for(Index i = k; i < size; i++) transpositions.coeffRef(i) = i;
- if(sign) *sign = 0;
break;
}
@@ -325,15 +335,15 @@ template<> struct ldlt_inplace
}
if((rs>0) && (abs(mat.coeffRef(k,k)) > cutoff))
A21 /= mat.coeffRef(k,k);
-
- if(sign)
- {
- // LDLT is not guaranteed to work for indefinite matrices, but let's try to get the sign right
- int newSign = numext::real(mat.diagonal().coeff(index_of_biggest_in_corner)) > 0;
- if(k == 0)
- *sign = newSign;
- else if(*sign != newSign)
- *sign = 0;
+
+ RealScalar realAkk = numext::real(mat.coeffRef(k,k));
+ if (sign == PositiveSemiDef) {
+ if (realAkk < 0) sign = Indefinite;
+ } else if (sign == NegativeSemiDef) {
+ if (realAkk > 0) sign = Indefinite;
+ } else if (sign == ZeroSign) {
+ if (realAkk > 0) sign = PositiveSemiDef;
+ else if (realAkk < 0) sign = NegativeSemiDef;
}
}
@@ -399,7 +409,7 @@ template<> struct ldlt_inplace
template<> struct ldlt_inplace
{
template
- static EIGEN_STRONG_INLINE bool unblocked(MatrixType& mat, TranspositionType& transpositions, Workspace& temp, int* sign=0)
+ static EIGEN_STRONG_INLINE bool unblocked(MatrixType& mat, TranspositionType& transpositions, Workspace& temp, SignMatrix& sign)
{
Transpose matt(mat);
return ldlt_inplace::unblocked(matt, transpositions, temp, sign);
@@ -445,7 +455,7 @@ LDLT& LDLT::compute(const MatrixType& a)
m_isInitialized = false;
m_temporary.resize(size);
- internal::ldlt_inplace::unblocked(m_matrix, m_transpositions, m_temporary, &m_sign);
+ internal::ldlt_inplace::unblocked(m_matrix, m_transpositions, m_temporary, m_sign);
m_isInitialized = true;
return *this;
@@ -473,7 +483,7 @@ LDLT& LDLT::rankUpdate(const MatrixBase=0 ? 1 : -1;
+ m_sign = sigma>=0 ? internal::PositiveSemiDef : internal::NegativeSemiDef;
m_isInitialized = true;
}
diff --git a/otherlibs/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h b/otherlibs/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h
index 783324b0b2..c449960de4 100644
--- a/otherlibs/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h
+++ b/otherlibs/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h
@@ -58,10 +58,12 @@ cholmod_sparse viewAsCholmod(SparseMatrix<_Scalar,_Options,_Index>& mat)
res.p = mat.outerIndexPtr();
res.i = mat.innerIndexPtr();
res.x = mat.valuePtr();
+ res.z = 0;
res.sorted = 1;
if(mat.isCompressed())
{
res.packed = 1;
+ res.nz = 0;
}
else
{
@@ -170,6 +172,7 @@ class CholmodBase : internal::noncopyable
CholmodBase()
: m_cholmodFactor(0), m_info(Success), m_isInitialized(false)
{
+ m_shiftOffset[0] = m_shiftOffset[1] = RealScalar(0.0);
cholmod_start(&m_cholmod);
}
@@ -241,7 +244,7 @@ class CholmodBase : internal::noncopyable
return internal::sparse_solve_retval(*this, b.derived());
}
- /** Performs a symbolic decomposition on the sparcity of \a matrix.
+ /** Performs a symbolic decomposition on the sparsity pattern of \a matrix.
*
* This function is particularly useful when solving for several problems having the same structure.
*
@@ -265,7 +268,7 @@ class CholmodBase : internal::noncopyable
/** Performs a numeric decomposition of \a matrix
*
- * The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.
+ * The given matrix must have the same sparsity pattern as the matrix on which the symbolic decomposition has been performed.
*
* \sa analyzePattern()
*/
@@ -302,7 +305,7 @@ class CholmodBase : internal::noncopyable
{
this->m_info = NumericalIssue;
}
- // TODO optimize this copy by swapping when possible (be carreful with alignment, etc.)
+ // TODO optimize this copy by swapping when possible (be careful with alignment, etc.)
dest = Matrix::Map(reinterpret_cast(x_cd->x),b.rows(),b.cols());
cholmod_free_dense(&x_cd, &m_cholmod);
}
@@ -323,7 +326,7 @@ class CholmodBase : internal::noncopyable
{
this->m_info = NumericalIssue;
}
- // TODO optimize this copy by swapping when possible (be carreful with alignment, etc.)
+ // TODO optimize this copy by swapping when possible (be careful with alignment, etc.)
dest = viewAsEigen(*x_cs);
cholmod_free_sparse(&x_cs, &m_cholmod);
}
@@ -365,8 +368,8 @@ class CholmodBase : internal::noncopyable
*
* This class allows to solve for A.X = B sparse linear problems via a simplicial LL^T Cholesky factorization
* using the Cholmod library.
- * This simplicial variant is equivalent to Eigen's built-in SimplicialLLT class. Thefore, it has little practical interest.
- * The sparse matrix A must be selfajoint and positive definite. The vectors or matrices
+ * This simplicial variant is equivalent to Eigen's built-in SimplicialLLT class. Therefore, it has little practical interest.
+ * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices
* X and B can be either dense or sparse.
*
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
@@ -412,8 +415,8 @@ class CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimpl
*
* This class allows to solve for A.X = B sparse linear problems via a simplicial LDL^T Cholesky factorization
* using the Cholmod library.
- * This simplicial variant is equivalent to Eigen's built-in SimplicialLDLT class. Thefore, it has little practical interest.
- * The sparse matrix A must be selfajoint and positive definite. The vectors or matrices
+ * This simplicial variant is equivalent to Eigen's built-in SimplicialLDLT class. Therefore, it has little practical interest.
+ * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices
* X and B can be either dense or sparse.
*
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
@@ -458,7 +461,7 @@ class CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimp
* This class allows to solve for A.X = B sparse linear problems via a supernodal LL^T Cholesky factorization
* using the Cholmod library.
* This supernodal variant performs best on dense enough problems, e.g., 3D FEM, or very high order 2D FEM.
- * The sparse matrix A must be selfajoint and positive definite. The vectors or matrices
+ * The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices
* X and B can be either dense or sparse.
*
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
@@ -501,7 +504,7 @@ class CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSuper
* \brief A general Cholesky factorization and solver based on Cholmod
*
* This class allows to solve for A.X = B sparse linear problems via a LL^T or LDL^T Cholesky factorization
- * using the Cholmod library. The sparse matrix A must be selfajoint and positive definite. The vectors or matrices
+ * using the Cholmod library. The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices
* X and B can be either dense or sparse.
*
* This variant permits to change the underlying Cholesky method at runtime.
diff --git a/otherlibs/eigen3/Eigen/src/Core/Array.h b/otherlibs/eigen3/Eigen/src/Core/Array.h
index d6ffe743a1..0ab03eff0f 100644
--- a/otherlibs/eigen3/Eigen/src/Core/Array.h
+++ b/otherlibs/eigen3/Eigen/src/Core/Array.h
@@ -210,7 +210,7 @@ class Array
: Base(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
{
Base::_check_template_params();
- Base::resize(other.rows(), other.cols());
+ Base::_resize_to_match(other);
*this = other;
}
@@ -234,8 +234,7 @@ class Array
friend struct internal::matrix_swap_impl;
};
-/** \defgroup arraytypedefs Global array typedefs
- * \ingroup eigen_grp
+/** \defgroup arraytypedefs Global array typedefs
* \ingroup Core_Module
*
* Eigen defines several typedef shortcuts for most common 1D and 2D array types.
diff --git a/otherlibs/eigen3/Eigen/src/Core/BooleanRedux.h b/otherlibs/eigen3/Eigen/src/Core/BooleanRedux.h
index 6e37e031a8..be9f48a8c7 100644
--- a/otherlibs/eigen3/Eigen/src/Core/BooleanRedux.h
+++ b/otherlibs/eigen3/Eigen/src/Core/BooleanRedux.h
@@ -29,9 +29,9 @@ struct all_unroller
};
template
-struct all_unroller
+struct all_unroller
{
- static inline bool run(const Derived &mat) { return mat.coeff(0, 0); }
+ static inline bool run(const Derived &/*mat*/) { return true; }
};
template
@@ -55,9 +55,9 @@ struct any_unroller
};
template
-struct any_unroller
+struct any_unroller
{
- static inline bool run(const Derived &mat) { return mat.coeff(0, 0); }
+ static inline bool run(const Derived & /*mat*/) { return false; }
};
template
diff --git a/otherlibs/eigen3/Eigen/src/Core/EigenBase.h b/otherlibs/eigen3/Eigen/src/Core/EigenBase.h
index 2b8dd1b706..fadb45852f 100644
--- a/otherlibs/eigen3/Eigen/src/Core/EigenBase.h
+++ b/otherlibs/eigen3/Eigen/src/Core/EigenBase.h
@@ -126,36 +126,6 @@ Derived& DenseBase::operator-=(const EigenBase &other)
return derived();
}
-/** replaces \c *this by \c *this * \a other.
- *
- * \returns a reference to \c *this
- */
-template
-template
-inline Derived&
-MatrixBase::operator*=(const EigenBase &other)
-{
- other.derived().applyThisOnTheRight(derived());
- return derived();
-}
-
-/** replaces \c *this by \c *this * \a other. It is equivalent to MatrixBase::operator*=().
- */
-template
-template
-inline void MatrixBase::applyOnTheRight(const EigenBase &other)
-{
- other.derived().applyThisOnTheRight(derived());
-}
-
-/** replaces \c *this by \c *this * \a other. */
-template
-template
-inline void MatrixBase::applyOnTheLeft(const EigenBase &other)
-{
- other.derived().applyThisOnTheLeft(derived());
-}
-
} // end namespace Eigen
#endif // EIGEN_EIGENBASE_H
diff --git a/otherlibs/eigen3/Eigen/src/Core/GeneralProduct.h b/otherlibs/eigen3/Eigen/src/Core/GeneralProduct.h
index 578f96dffa..2a59d94645 100644
--- a/otherlibs/eigen3/Eigen/src/Core/GeneralProduct.h
+++ b/otherlibs/eigen3/Eigen/src/Core/GeneralProduct.h
@@ -11,7 +11,7 @@
#ifndef EIGEN_GENERAL_PRODUCT_H
#define EIGEN_GENERAL_PRODUCT_H
-namespace Eigen {
+namespace Eigen {
/** \class GeneralProduct
* \ingroup Core_Module
@@ -258,7 +258,7 @@ class GeneralProduct
: public ProductBase, Lhs, Rhs>
{
template struct IsRowMajor : internal::conditional<(int(T::Flags)&RowMajorBit), internal::true_type, internal::false_type>::type {};
-
+
public:
EIGEN_PRODUCT_PUBLIC_INTERFACE(GeneralProduct)
@@ -267,7 +267,7 @@ class GeneralProduct
EIGEN_STATIC_ASSERT((internal::is_same::value),
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
}
-
+
struct set { template void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived() = src; } };
struct add { template void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived() += src; } };
struct sub { template void operator()(const Dst& dst, const Src& src) const { dst.const_cast_derived() -= src; } };
@@ -278,12 +278,12 @@ class GeneralProduct
dst.const_cast_derived() += m_scale * src;
}
};
-
+
template
inline void evalTo(Dest& dest) const {
internal::outer_product_selector_run(*this, dest, set(), IsRowMajor());
}
-
+
template
inline void addTo(Dest& dest) const {
internal::outer_product_selector_run(*this, dest, add(), IsRowMajor());
@@ -437,12 +437,12 @@ template<> struct gemv_selector
bool alphaIsCompatible = (!ComplexByReal) || (numext::imag(actualAlpha)==RealScalar(0));
bool evalToDest = EvalToDestAtCompileTime && alphaIsCompatible;
-
+
RhsScalar compatibleAlpha = get_factor::run(actualAlpha);
ei_declare_aligned_stack_constructed_variable(ResScalar,actualDestPtr,dest.size(),
evalToDest ? dest.data() : static_dest.data());
-
+
if(!evalToDest)
{
#ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
@@ -587,7 +587,8 @@ MatrixBase::operator*(const MatrixBase &other) const
EIGEN_STATIC_ASSERT(ProductIsValid || !(AreVectors && SameSizes),
INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS)
EIGEN_STATIC_ASSERT(ProductIsValid || !(SameSizes && !AreVectors),
- INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION) EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)
+ INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION)
+ EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)
#ifdef EIGEN_DEBUG_PRODUCT
internal::product_type::debug();
#endif
diff --git a/otherlibs/eigen3/Eigen/src/Core/IO.h b/otherlibs/eigen3/Eigen/src/Core/IO.h
index c8d5f6379b..8d4bc59e9d 100644
--- a/otherlibs/eigen3/Eigen/src/Core/IO.h
+++ b/otherlibs/eigen3/Eigen/src/Core/IO.h
@@ -185,21 +185,22 @@ std::ostream & print_matrix(std::ostream & s, const Derived& _m, const IOFormat&
explicit_precision = fmt.precision;
}
+ std::streamsize old_precision = 0;
+ if(explicit_precision) old_precision = s.precision(explicit_precision);
+
bool align_cols = !(fmt.flags & DontAlignCols);
if(align_cols)
{
// compute the largest width
- for(Index j = 1; j < m.cols(); ++j)
+ for(Index j = 0; j < m.cols(); ++j)
for(Index i = 0; i < m.rows(); ++i)
{
std::stringstream sstr;
- if(explicit_precision) sstr.precision(explicit_precision);
+ sstr.copyfmt(s);
sstr << m.coeff(i,j);
width = std::max(width, Index(sstr.str().length()));
}
}
- std::streamsize old_precision = 0;
- if(explicit_precision) old_precision = s.precision(explicit_precision);
s << fmt.matPrefix;
for(Index i = 0; i < m.rows(); ++i)
{
diff --git a/otherlibs/eigen3/Eigen/src/Core/Matrix.h b/otherlibs/eigen3/Eigen/src/Core/Matrix.h
index bad8aa08b2..d7d0b5b9a4 100644
--- a/otherlibs/eigen3/Eigen/src/Core/Matrix.h
+++ b/otherlibs/eigen3/Eigen/src/Core/Matrix.h
@@ -304,7 +304,7 @@ class Matrix
: Base(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
{
Base::_check_template_params();
- Base::resize(other.rows(), other.cols());
+ Base::_resize_to_match(other);
// FIXME/CHECK: isn't *this = other.derived() more efficient. it allows to
// go for pure _set() implementations, right?
*this = other;
@@ -347,8 +347,7 @@ class Matrix
using Base::m_storage;
};
-/** \defgroup matrixtypedefs Global matrix typedefs
- * \ingroup eigen_grp
+/** \defgroup matrixtypedefs Global matrix typedefs
*
* \ingroup Core_Module
*
diff --git a/otherlibs/eigen3/Eigen/src/Core/MatrixBase.h b/otherlibs/eigen3/Eigen/src/Core/MatrixBase.h
index 9193b6abb3..344b38f2fc 100644
--- a/otherlibs/eigen3/Eigen/src/Core/MatrixBase.h
+++ b/otherlibs/eigen3/Eigen/src/Core/MatrixBase.h
@@ -510,6 +510,51 @@ template class MatrixBase
{EIGEN_STATIC_ASSERT(std::ptrdiff_t(sizeof(typename OtherDerived::Scalar))==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES); return *this;}
};
+
+/***************************************************************************
+* Implementation of matrix base methods
+***************************************************************************/
+
+/** replaces \c *this by \c *this * \a other.
+ *
+ * \returns a reference to \c *this
+ *
+ * Example: \include MatrixBase_applyOnTheRight.cpp
+ * Output: \verbinclude MatrixBase_applyOnTheRight.out
+ */
+template
+template
+inline Derived&
+MatrixBase::operator*=(const EigenBase &other)
+{
+ other.derived().applyThisOnTheRight(derived());
+ return derived();
+}
+
+/** replaces \c *this by \c *this * \a other. It is equivalent to MatrixBase::operator*=().
+ *
+ * Example: \include MatrixBase_applyOnTheRight.cpp
+ * Output: \verbinclude MatrixBase_applyOnTheRight.out
+ */
+template
+template
+inline void MatrixBase::applyOnTheRight(const EigenBase &other)
+{
+ other.derived().applyThisOnTheRight(derived());
+}
+
+/** replaces \c *this by \a other * \c *this.
+ *
+ * Example: \include MatrixBase_applyOnTheLeft.cpp
+ * Output: \verbinclude MatrixBase_applyOnTheLeft.out
+ */
+template
+template
+inline void MatrixBase::applyOnTheLeft(const EigenBase &other)
+{
+ other.derived().applyThisOnTheLeft(derived());
+}
+
} // end namespace Eigen
#endif // EIGEN_MATRIXBASE_H
diff --git a/otherlibs/eigen3/Eigen/src/Core/PermutationMatrix.h b/otherlibs/eigen3/Eigen/src/Core/PermutationMatrix.h
index 4fc5dd3189..1297b8413f 100644
--- a/otherlibs/eigen3/Eigen/src/Core/PermutationMatrix.h
+++ b/otherlibs/eigen3/Eigen/src/Core/PermutationMatrix.h
@@ -553,7 +553,8 @@ struct permut_matrix_product_retval
template inline void evalTo(Dest& dst) const
{
const Index n = Side==OnTheLeft ? rows() : cols();
-
+ // FIXME we need an is_same for expression that is not sensitive to constness. For instance
+ // is_same_xpr, Block >::value should be true.
if(is_same::value && extract_data(dst) == extract_data(m_matrix))
{
// apply the permutation inplace
diff --git a/otherlibs/eigen3/Eigen/src/Core/PlainObjectBase.h b/otherlibs/eigen3/Eigen/src/Core/PlainObjectBase.h
index af0a479c76..dd34b59e54 100644
--- a/otherlibs/eigen3/Eigen/src/Core/PlainObjectBase.h
+++ b/otherlibs/eigen3/Eigen/src/Core/PlainObjectBase.h
@@ -47,7 +47,10 @@ template<> struct check_rows_cols_for_overflow {
}
};
-template struct conservative_resize_like_impl;
+template
+struct conservative_resize_like_impl;
template struct matrix_swap_impl;
@@ -668,8 +671,10 @@ class PlainObjectBase : public internal::dense_xpr_base::type
enum { ThisConstantIsPrivateInPlainObjectBase };
};
+namespace internal {
+
template
-struct internal::conservative_resize_like_impl
+struct conservative_resize_like_impl
{
typedef typename Derived::Index Index;
static void run(DenseBase& _this, Index rows, Index cols)
@@ -729,11 +734,14 @@ struct internal::conservative_resize_like_impl
}
};
-namespace internal {
-
+// Here, the specialization for vectors inherits from the general matrix case
+// to allow calling .conservativeResize(rows,cols) on vectors.
template
struct conservative_resize_like_impl
+ : conservative_resize_like_impl
{
+ using conservative_resize_like_impl::run;
+
typedef typename Derived::Index Index;
static void run(DenseBase& _this, Index size)
{
diff --git a/otherlibs/eigen3/Eigen/src/Core/Ref.h b/otherlibs/eigen3/Eigen/src/Core/Ref.h
index aba795bdb7..00d9e6d2b4 100644
--- a/otherlibs/eigen3/Eigen/src/Core/Ref.h
+++ b/otherlibs/eigen3/Eigen/src/Core/Ref.h
@@ -94,7 +94,8 @@ struct traits[ >
typedef _PlainObjectType PlainObjectType;
typedef _StrideType StrideType;
enum {
- Options = _Options
+ Options = _Options,
+ Flags = traits]