mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Merge with upstream eigen/default
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
|
||||
#include <Eigen/Geometry>
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
/**
|
||||
@@ -221,4 +223,6 @@ struct evaluator<AlignedVector3<Scalar> >
|
||||
|
||||
}
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif // EIGEN_ALIGNED_VECTOR3
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
|
||||
#include <Eigen/Core>
|
||||
|
||||
#include <Eigen/src/Core/util/DisableStupidWarnings.h>
|
||||
|
||||
/** \defgroup ArpackSupport_Module Arpack support module
|
||||
*
|
||||
* This module provides a wrapper to Arpack, a library for sparse eigenvalue decomposition.
|
||||
@@ -23,6 +21,8 @@
|
||||
*/
|
||||
|
||||
#include <Eigen/SparseCholesky>
|
||||
|
||||
#include <Eigen/src/Core/util/DisableStupidWarnings.h>
|
||||
#include "src/Eigenvalues/ArpackSelfAdjointEigenSolver.h"
|
||||
|
||||
#include <Eigen/src/Core/util/ReenableStupidWarnings.h>
|
||||
|
||||
@@ -28,11 +28,17 @@ namespace Eigen {
|
||||
//@{
|
||||
|
||||
}
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
|
||||
#include "src/AutoDiff/AutoDiffScalar.h"
|
||||
// #include "src/AutoDiff/AutoDiffVector.h"
|
||||
#include "src/AutoDiff/AutoDiffJacobian.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
|
||||
|
||||
namespace Eigen {
|
||||
//@}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
#include <Eigen/src/Core/util/DisableStupidWarnings.h>
|
||||
|
||||
#include "../SpecialFunctions"
|
||||
|
||||
#include <Eigen/src/Core/util/DisableStupidWarnings.h>
|
||||
#include "src/util/CXX11Meta.h"
|
||||
#include "src/util/MaxSizeVector.h"
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ struct TensorOpResourceRequirements {
|
||||
};
|
||||
|
||||
// Tries to merge multiple resource requirements.
|
||||
EIGEN_STRONG_INLINE void MergeResourceRequirements(
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void MergeResourceRequirements(
|
||||
const std::vector<TensorOpResourceRequirements>& resources,
|
||||
TensorBlockShapeType* block_shape, Index* block_total_size) {
|
||||
if (resources.empty()) {
|
||||
|
||||
@@ -194,7 +194,7 @@ template <std::ptrdiff_t V1=0, std::ptrdiff_t V2=0, std::ptrdiff_t V3=0, std::pt
|
||||
}
|
||||
#endif
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex operator[] (const int index) const {
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index operator[] (const Index index) const {
|
||||
switch (index) {
|
||||
case 0:
|
||||
return internal::get<0, Base>::value;
|
||||
@@ -208,7 +208,7 @@ template <std::ptrdiff_t V1=0, std::ptrdiff_t V2=0, std::ptrdiff_t V3=0, std::pt
|
||||
return internal::get<4, Base>::value;
|
||||
default:
|
||||
eigen_assert(false && "index overflow");
|
||||
return static_cast<DenseIndex>(-1);
|
||||
return static_cast<Index>(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE t array_prod(const array<t, n>& a) {
|
||||
}
|
||||
template<typename t>
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE t array_prod(const array<t, 0>& /*a*/) {
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
template<typename t>
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#ifdef EIGEN_FFTW_DEFAULT
|
||||
// FFTW: faster, GPL -- incompatible with Eigen in LGPL form, bigger code size
|
||||
# include <fftw3.h>
|
||||
@@ -415,5 +417,8 @@ void fft_inv_proxy<T_SrcMat,T_FftIfc>::evalTo(T_DestMat& dst) const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif
|
||||
/* vim: set filetype=cpp et sw=2 ts=2 ai: */
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#define EIGEN_ITERATIVE_SOLVERS_MODULE_H
|
||||
|
||||
#include <Eigen/Sparse>
|
||||
#include "../../Eigen/Jacobi"
|
||||
#include "../../Eigen/Householder"
|
||||
|
||||
/**
|
||||
* \defgroup IterativeSolvers_Module Iterative solvers module
|
||||
@@ -24,19 +26,21 @@
|
||||
*/
|
||||
//@{
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#ifndef EIGEN_MPL2_ONLY
|
||||
#include "src/IterativeSolvers/IterationController.h"
|
||||
#include "src/IterativeSolvers/ConstrainedConjGrad.h"
|
||||
#endif
|
||||
|
||||
#include "src/IterativeSolvers/IncompleteLU.h"
|
||||
#include "../../Eigen/Jacobi"
|
||||
#include "../../Eigen/Householder"
|
||||
#include "src/IterativeSolvers/GMRES.h"
|
||||
#include "src/IterativeSolvers/DGMRES.h"
|
||||
//#include "src/IterativeSolvers/SSORPreconditioner.h"
|
||||
#include "src/IterativeSolvers/MINRES.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
//@}
|
||||
|
||||
#endif // EIGEN_ITERATIVE_SOLVERS_MODULE_H
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
*/
|
||||
|
||||
#include "Eigen/SparseCore"
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
|
||||
#include "src/LevenbergMarquardt/LMqrsolv.h"
|
||||
@@ -41,5 +44,6 @@
|
||||
#include "src/LevenbergMarquardt/LevenbergMarquardt.h"
|
||||
#include "src/LevenbergMarquardt/LMonestep.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif // EIGEN_LEVENBERGMARQUARDT_MODULE
|
||||
|
||||
@@ -53,12 +53,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#include "src/MatrixFunctions/MatrixExponential.h"
|
||||
#include "src/MatrixFunctions/MatrixFunction.h"
|
||||
#include "src/MatrixFunctions/MatrixSquareRoot.h"
|
||||
#include "src/MatrixFunctions/MatrixLogarithm.h"
|
||||
#include "src/MatrixFunctions/MatrixPower.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
|
||||
/**
|
||||
\page matrixbaseextra_page
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
#include <Eigen/Core>
|
||||
|
||||
#include <Eigen/src/Core/util/DisableStupidWarnings.h>
|
||||
|
||||
#include <Eigen/Eigenvalues>
|
||||
|
||||
#include <Eigen/src/Core/util/DisableStupidWarnings.h>
|
||||
|
||||
// Note that EIGEN_HIDE_HEAVY_CODE has to be defined per module
|
||||
#if (defined EIGEN_EXTERN_INSTANTIATIONS) && (EIGEN_EXTERN_INSTANTIATIONS>=2)
|
||||
#ifndef EIGEN_HIDE_HEAVY_CODE
|
||||
|
||||
@@ -24,8 +24,12 @@ namespace Eigen
|
||||
*/
|
||||
}
|
||||
|
||||
#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
|
||||
|
||||
#include "src/Splines/SplineFwd.h"
|
||||
#include "src/Splines/Spline.h"
|
||||
#include "src/Splines/SplineFitting.h"
|
||||
|
||||
#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
|
||||
|
||||
#endif // EIGEN_SPLINES_MODULE_H
|
||||
|
||||
@@ -173,15 +173,14 @@ namespace Eigen
|
||||
EIGEN_EULER_ANGLES_CLASS_STATIC_ASSERT((unsigned)BetaAxisAbs != (unsigned)GammaAxisAbs,
|
||||
BETA_AXIS_CANT_BE_EQUAL_TO_GAMMA_AXIS);
|
||||
|
||||
enum
|
||||
{
|
||||
static const int
|
||||
// I, J, K are the pivot indexes permutation for the rotation matrix, that match this Euler system.
|
||||
// They are used in this class converters.
|
||||
// They are always different from each other, and their possible values are: 0, 1, or 2.
|
||||
I = AlphaAxisAbs - 1,
|
||||
J = (AlphaAxisAbs - 1 + 1 + IsOdd)%3,
|
||||
K = (AlphaAxisAbs - 1 + 2 - IsOdd)%3
|
||||
};
|
||||
;
|
||||
|
||||
// TODO: Get @mat parameter in form that avoids double evaluation.
|
||||
template <typename Derived>
|
||||
|
||||
@@ -234,12 +234,13 @@ struct matrix_exp_computeUV<MatrixType, float>
|
||||
template <typename MatrixType>
|
||||
struct matrix_exp_computeUV<MatrixType, double>
|
||||
{
|
||||
typedef typename NumTraits<typename traits<MatrixType>::Scalar>::Real RealScalar;
|
||||
template <typename ArgType>
|
||||
static void run(const ArgType& arg, MatrixType& U, MatrixType& V, int& squarings)
|
||||
{
|
||||
using std::frexp;
|
||||
using std::pow;
|
||||
const double l1norm = arg.cwiseAbs().colwise().sum().maxCoeff();
|
||||
const RealScalar l1norm = arg.cwiseAbs().colwise().sum().maxCoeff();
|
||||
squarings = 0;
|
||||
if (l1norm < 1.495585217958292e-002) {
|
||||
matrix_exp_pade3(arg, U, V);
|
||||
@@ -250,10 +251,10 @@ struct matrix_exp_computeUV<MatrixType, double>
|
||||
} else if (l1norm < 2.097847961257068e+000) {
|
||||
matrix_exp_pade9(arg, U, V);
|
||||
} else {
|
||||
const double maxnorm = 5.371920351148152;
|
||||
const RealScalar maxnorm = 5.371920351148152;
|
||||
frexp(l1norm / maxnorm, &squarings);
|
||||
if (squarings < 0) squarings = 0;
|
||||
MatrixType A = arg.unaryExpr(MatrixExponentialScalingOp<double>(squarings));
|
||||
MatrixType A = arg.unaryExpr(MatrixExponentialScalingOp<RealScalar>(squarings));
|
||||
matrix_exp_pade13(A, U, V);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +565,7 @@ void testLmdif1()
|
||||
|
||||
// do the computation
|
||||
lmdif_functor functor;
|
||||
DenseIndex nfev;
|
||||
DenseIndex nfev = -1; // initialize to avoid maybe-uninitialized warning
|
||||
info = LevenbergMarquardt<lmdif_functor>::lmdif1(functor, x, &nfev);
|
||||
|
||||
// check return value
|
||||
|
||||
@@ -24,7 +24,7 @@ struct Functor
|
||||
int m_inputs, m_values;
|
||||
|
||||
Functor() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}
|
||||
Functor(int inputs, int values) : m_inputs(inputs), m_values(values) {}
|
||||
Functor(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {}
|
||||
|
||||
int inputs() const { return m_inputs; }
|
||||
int values() const { return m_values; }
|
||||
|
||||
@@ -44,7 +44,7 @@ struct TestFunc1
|
||||
int m_inputs, m_values;
|
||||
|
||||
TestFunc1() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}
|
||||
TestFunc1(int inputs, int values) : m_inputs(inputs), m_values(values) {}
|
||||
TestFunc1(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {}
|
||||
|
||||
int inputs() const { return m_inputs; }
|
||||
int values() const { return m_values; }
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#include "../../test/sparse_solver.h"
|
||||
#include <Eigen/src/IterativeSolvers/DGMRES.h>
|
||||
#include <unsupported/Eigen/IterativeSolvers>
|
||||
|
||||
template<typename T> void test_dgmres_T()
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ struct TestFunc1
|
||||
int m_inputs, m_values;
|
||||
|
||||
TestFunc1() : m_inputs(InputsAtCompileTime), m_values(ValuesAtCompileTime) {}
|
||||
TestFunc1(int inputs, int values) : m_inputs(inputs), m_values(values) {}
|
||||
TestFunc1(int inputs_, int values_) : m_inputs(inputs_), m_values(values_) {}
|
||||
|
||||
int inputs() const { return m_inputs; }
|
||||
int values() const { return m_values; }
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
// import basic and product tests for deprecated DynamicSparseMatrix
|
||||
#define EIGEN_NO_DEPRECATED_WARNING
|
||||
#include "sparse_basic.cpp"
|
||||
#include "sparse_product.cpp"
|
||||
#include "sparse_basic.cpp"
|
||||
#include <Eigen/SparseExtra>
|
||||
|
||||
template<typename SetterType,typename DenseType, typename Scalar, int Options>
|
||||
|
||||
Reference in New Issue
Block a user