diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-09-04 09:23:38 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-09-04 09:23:38 +0200 |
commit | 68b28f7bfb29474ad21036476618a3730fa7fffa (patch) | |
tree | 4a2110fb56cdac34db426c2a9381bbb209cb8b51 | |
parent | 7f5256f628fbc860a4f85fae999f22e8cb7d2837 (diff) |
rename the EigenSolver module to Eigenvalues
-rw-r--r-- | Eigen/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Eigen/EigenSolver | 74 | ||||
-rw-r--r-- | Eigen/Eigenvalues | 74 | ||||
-rw-r--r-- | Eigen/LeastSquares | 2 | ||||
-rw-r--r-- | Eigen/QR | 4 | ||||
-rw-r--r-- | Eigen/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Eigen/src/EigenSolver/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/ComplexEigenSolver.h (renamed from Eigen/src/EigenSolver/ComplexEigenSolver.h) | 13 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/ComplexSchur.h (renamed from Eigen/src/EigenSolver/ComplexSchur.h) | 7 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/EigenSolver.h (renamed from Eigen/src/EigenSolver/EigenSolver.h) | 2 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/HessenbergDecomposition.h (renamed from Eigen/src/EigenSolver/HessenbergDecomposition.h) | 2 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h (renamed from Eigen/src/EigenSolver/SelfAdjointEigenSolver.h) | 8 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/Tridiagonalization.h (renamed from Eigen/src/EigenSolver/Tridiagonalization.h) | 2 | ||||
-rw-r--r-- | doc/Doxyfile.in | 2 | ||||
-rw-r--r-- | test/eigensolver_complex.cpp | 2 | ||||
-rw-r--r-- | test/eigensolver_generic.cpp | 2 | ||||
-rw-r--r-- | test/eigensolver_selfadjoint.cpp | 2 | ||||
-rw-r--r-- | test/mixingtypes.cpp | 2 |
19 files changed, 111 insertions, 103 deletions
diff --git a/Eigen/CMakeLists.txt b/Eigen/CMakeLists.txt index ebdf57812..931cc6e20 100644 --- a/Eigen/CMakeLists.txt +++ b/Eigen/CMakeLists.txt @@ -1,4 +1,4 @@ -set(Eigen_HEADERS Core LU Cholesky QR Geometry Sparse Array SVD LeastSquares QtAlignedMalloc StdVector Householder Jacobi EigenSolver) +set(Eigen_HEADERS Core LU Cholesky QR Geometry Sparse Array SVD LeastSquares QtAlignedMalloc StdVector Householder Jacobi Eigenvalues) if(EIGEN_BUILD_LIB) set(Eigen_SRCS diff --git a/Eigen/EigenSolver b/Eigen/EigenSolver deleted file mode 100644 index fd126d282..000000000 --- a/Eigen/EigenSolver +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef EIGEN_EIGEN_SOLVER_MODULE_H -#define EIGEN_EIGEN_SOLVER_MODULE_H - -#include "Core" - -#include "src/Core/util/DisableMSVCWarnings.h" - -#include "Cholesky" -#include "Jacobi" -#include "Householder" - -// 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 - #define EIGEN_HIDE_HEAVY_CODE - #endif -#elif defined EIGEN_HIDE_HEAVY_CODE - #undef EIGEN_HIDE_HEAVY_CODE -#endif - -namespace Eigen { - -/** \defgroup EigenSolver_Module Eigen Solver module - * - * \nonstableyet - * - * This module mainly provides various eigen value solvers. - * This module also provides some MatrixBase methods, including: - * - MatrixBase::eigenvalues(), - * - MatrixBase::operatorNorm() - * - * \code - * #include <Eigen/EigenSolver> - * \endcode - */ - -#include "src/EigenSolver/Tridiagonalization.h" -#include "src/EigenSolver/EigenSolver.h" -#include "src/EigenSolver/SelfAdjointEigenSolver.h" -#include "src/EigenSolver/HessenbergDecomposition.h" -#include "src/EigenSolver/ComplexSchur.h" -#include "src/EigenSolver/ComplexEigenSolver.h" - -// declare all classes for a given matrix type -#define EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(MATRIXTYPE,PREFIX) \ - PREFIX template class Tridiagonalization<MATRIXTYPE>; \ - PREFIX template class HessenbergDecomposition<MATRIXTYPE>; \ - PREFIX template class SelfAdjointEigenSolver<MATRIXTYPE> - -// removed because it does not support complex yet -// PREFIX template class EigenSolver<MATRIXTYPE> - -// declare all class for all types -#define EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE(PREFIX) \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(Matrix2f,PREFIX); \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(Matrix2d,PREFIX); \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(Matrix3f,PREFIX); \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(Matrix3d,PREFIX); \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(Matrix4f,PREFIX); \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(Matrix4d,PREFIX); \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(MatrixXf,PREFIX); \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(MatrixXd,PREFIX); \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(MatrixXcf,PREFIX); \ - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE_TYPE(MatrixXcd,PREFIX) - -#ifdef EIGEN_EXTERN_INSTANTIATIONS - EIGEN_EIGEN_SOLVER_MODULE_INSTANTIATE(extern); -#endif // EIGEN_EXTERN_INSTANTIATIONS - -} // namespace Eigen - -#include "src/Core/util/EnableMSVCWarnings.h" - -#endif // EIGEN_EIGEN_SOLVER_MODULE_H diff --git a/Eigen/Eigenvalues b/Eigen/Eigenvalues new file mode 100644 index 000000000..9a6443f39 --- /dev/null +++ b/Eigen/Eigenvalues @@ -0,0 +1,74 @@ +#ifndef EIGEN_EIGENVALUES_MODULE_H +#define EIGEN_EIGENVALUES_MODULE_H + +#include "Core" + +#include "src/Core/util/DisableMSVCWarnings.h" + +#include "Cholesky" +#include "Jacobi" +#include "Householder" + +// 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 + #define EIGEN_HIDE_HEAVY_CODE + #endif +#elif defined EIGEN_HIDE_HEAVY_CODE + #undef EIGEN_HIDE_HEAVY_CODE +#endif + +namespace Eigen { + +/** \defgroup Eigenvalues_Module Eigenvalues module + * + * \nonstableyet + * + * This module mainly provides various eigenvalue solvers. + * This module also provides some MatrixBase methods, including: + * - MatrixBase::eigenvalues(), + * - MatrixBase::operatorNorm() + * + * \code + * #include <Eigen/Eigenvalues> + * \endcode + */ + +#include "src/Eigenvalues/Tridiagonalization.h" +#include "src/Eigenvalues/EigenSolver.h" +#include "src/Eigenvalues/SelfAdjointEigenSolver.h" +#include "src/Eigenvalues/HessenbergDecomposition.h" +#include "src/Eigenvalues/ComplexSchur.h" +#include "src/Eigenvalues/ComplexEigenSolver.h" + +// declare all classes for a given matrix type +#define EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(MATRIXTYPE,PREFIX) \ + PREFIX template class Tridiagonalization<MATRIXTYPE>; \ + PREFIX template class HessenbergDecomposition<MATRIXTYPE>; \ + PREFIX template class SelfAdjointEigenSolver<MATRIXTYPE> + +// removed because it does not support complex yet +// PREFIX template class EigenSolver<MATRIXTYPE> + +// declare all class for all types +#define EIGEN_EIGENVALUES_MODULE_INSTANTIATE(PREFIX) \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(Matrix2f,PREFIX); \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(Matrix2d,PREFIX); \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(Matrix3f,PREFIX); \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(Matrix3d,PREFIX); \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(Matrix4f,PREFIX); \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(Matrix4d,PREFIX); \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(MatrixXf,PREFIX); \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(MatrixXd,PREFIX); \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(MatrixXcf,PREFIX); \ + EIGEN_EIGENVALUES_MODULE_INSTANTIATE_TYPE(MatrixXcd,PREFIX) + +#ifdef EIGEN_EXTERN_INSTANTIATIONS + EIGEN_EIGENVALUES_MODULE_INSTANTIATE(extern); +#endif // EIGEN_EXTERN_INSTANTIATIONS + +} // namespace Eigen + +#include "src/Core/util/EnableMSVCWarnings.h" + +#endif // EIGEN_EIGENVALUES_MODULE_H diff --git a/Eigen/LeastSquares b/Eigen/LeastSquares index db620f548..75620a349 100644 --- a/Eigen/LeastSquares +++ b/Eigen/LeastSquares @@ -5,7 +5,7 @@ #include "src/Core/util/DisableMSVCWarnings.h" -#include "EigenSolver" +#include "Eigenvalues" #include "Geometry" namespace Eigen { @@ -62,7 +62,7 @@ namespace Eigen { #include "src/Core/util/EnableMSVCWarnings.h" -// FIXME for compatibility we include EigenSolver here: -#include "EigenSolver" +// FIXME for compatibility we include Eigenvalues here: +#include "Eigenvalues" #endif // EIGEN_QR_MODULE_H diff --git a/Eigen/src/CMakeLists.txt b/Eigen/src/CMakeLists.txt index 6b1333860..0df8273d1 100644 --- a/Eigen/src/CMakeLists.txt +++ b/Eigen/src/CMakeLists.txt @@ -9,4 +9,4 @@ ADD_SUBDIRECTORY(LeastSquares) ADD_SUBDIRECTORY(Sparse) ADD_SUBDIRECTORY(Jacobi) ADD_SUBDIRECTORY(Householder) -ADD_SUBDIRECTORY(EigenSolver) +ADD_SUBDIRECTORY(Eigenvalues) diff --git a/Eigen/src/EigenSolver/CMakeLists.txt b/Eigen/src/EigenSolver/CMakeLists.txt deleted file mode 100644 index 63bc75e0c..000000000 --- a/Eigen/src/EigenSolver/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -FILE(GLOB Eigen_EIGENSOLVER_SRCS "*.h") - -INSTALL(FILES - ${Eigen_EIGENSOLVER_SRCS} - DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/EigenSolver COMPONENT Devel - ) diff --git a/Eigen/src/Eigenvalues/CMakeLists.txt b/Eigen/src/Eigenvalues/CMakeLists.txt new file mode 100644 index 000000000..193e02685 --- /dev/null +++ b/Eigen/src/Eigenvalues/CMakeLists.txt @@ -0,0 +1,6 @@ +FILE(GLOB Eigen_EIGENVALUES_SRCS "*.h") + +INSTALL(FILES + ${Eigen_EIGENVALUES_SRCS} + DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigenvalues COMPONENT Devel + ) diff --git a/Eigen/src/EigenSolver/ComplexEigenSolver.h b/Eigen/src/Eigenvalues/ComplexEigenSolver.h index 2ea7464a6..666381949 100644 --- a/Eigen/src/EigenSolver/ComplexEigenSolver.h +++ b/Eigen/src/Eigenvalues/ComplexEigenSolver.h @@ -26,8 +26,17 @@ #ifndef EIGEN_COMPLEX_EIGEN_SOLVER_H
#define EIGEN_COMPLEX_EIGEN_SOLVER_H
-#define MAXITER 30
-
+/** \eigenvalues_module \ingroup Eigenvalues_Module
+ * \nonstableyet
+ *
+ * \class ComplexEigenSolver
+ *
+ * \brief Eigen values/vectors solver for general complex matrices
+ *
+ * \param MatrixType the type of the matrix of which we are computing the eigen decomposition
+ *
+ * \sa class EigenSolver, class SelfAdjointEigenSolver
+ */
template<typename _MatrixType> class ComplexEigenSolver
{
public:
diff --git a/Eigen/src/EigenSolver/ComplexSchur.h b/Eigen/src/Eigenvalues/ComplexSchur.h index 1a07fe163..58e2ea440 100644 --- a/Eigen/src/EigenSolver/ComplexSchur.h +++ b/Eigen/src/Eigenvalues/ComplexSchur.h @@ -26,9 +26,8 @@ #ifndef EIGEN_COMPLEX_SCHUR_H #define EIGEN_COMPLEX_SCHUR_H -#define MAXITER 30 - -/** \ingroup QR +/** \eigenvalues_module \ingroup Eigenvalues_Module + * \nonstableyet * * \class ComplexShur * @@ -155,7 +154,7 @@ void ComplexSchur<MatrixType>::compute(const MatrixType& matrix) if(iu==0) break; iter++; - if(iter >= MAXITER) + if(iter >= 30) { // FIXME : what to do when iter==MAXITER ?? std::cerr << "MAXITER" << std::endl; diff --git a/Eigen/src/EigenSolver/EigenSolver.h b/Eigen/src/Eigenvalues/EigenSolver.h index 1046780c6..3fc36c080 100644 --- a/Eigen/src/EigenSolver/EigenSolver.h +++ b/Eigen/src/Eigenvalues/EigenSolver.h @@ -25,7 +25,7 @@ #ifndef EIGEN_EIGENSOLVER_H #define EIGEN_EIGENSOLVER_H -/** \ingroup EigenSolver_Module +/** \eigenvalues_module \ingroup Eigenvalues_Module * \nonstableyet * * \class EigenSolver diff --git a/Eigen/src/EigenSolver/HessenbergDecomposition.h b/Eigen/src/Eigenvalues/HessenbergDecomposition.h index f782cef30..b1e21d4ee 100644 --- a/Eigen/src/EigenSolver/HessenbergDecomposition.h +++ b/Eigen/src/Eigenvalues/HessenbergDecomposition.h @@ -25,7 +25,7 @@ #ifndef EIGEN_HESSENBERGDECOMPOSITION_H #define EIGEN_HESSENBERGDECOMPOSITION_H -/** \ingroup EigenSolver_Module +/** \eigenvalues_module \ingroup Eigenvalues_Module * \nonstableyet * * \class HessenbergDecomposition diff --git a/Eigen/src/EigenSolver/SelfAdjointEigenSolver.h b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h index 40b06df2c..84856aa66 100644 --- a/Eigen/src/EigenSolver/SelfAdjointEigenSolver.h +++ b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h @@ -25,7 +25,7 @@ #ifndef EIGEN_SELFADJOINTEIGENSOLVER_H #define EIGEN_SELFADJOINTEIGENSOLVER_H -/** \eigensolver_module \ingroup EigenSolver_Module +/** \eigenvalues_module \ingroup Eigenvalues_Module * \nonstableyet * * \class SelfAdjointEigenSolver @@ -137,7 +137,7 @@ template<typename _MatrixType> class SelfAdjointEigenSolver /** \internal * - * \eigensolver_module + * \eigenvalues_module \ingroup Eigenvalues_Module * * Performs a QR step on a tridiagonal symmetric matrix represented as a * pair of two vectors \a diag and \a subdiag. @@ -266,7 +266,7 @@ compute(const MatrixType& matA, const MatrixType& matB, bool computeEigenvectors #endif // EIGEN_HIDE_HEAVY_CODE -/** \eigensolver_module +/** \eigenvalues_module * * \returns a vector listing the eigenvalues of this matrix. */ @@ -307,7 +307,7 @@ template<typename Derived> struct ei_operatorNorm_selector<Derived, false> } }; -/** \eigensolver_module +/** \eigenvalues_module * * \returns the matrix norm of this matrix. */ diff --git a/Eigen/src/EigenSolver/Tridiagonalization.h b/Eigen/src/Eigenvalues/Tridiagonalization.h index e0bff17b9..5f891bfa6 100644 --- a/Eigen/src/EigenSolver/Tridiagonalization.h +++ b/Eigen/src/Eigenvalues/Tridiagonalization.h @@ -25,7 +25,7 @@ #ifndef EIGEN_TRIDIAGONALIZATION_H #define EIGEN_TRIDIAGONALIZATION_H -/** \ingroup EigenSolver_Module +/** \eigenvalues_module \ingroup Eigenvalues_Module * \nonstableyet * * \class Tridiagonalization diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index bd0df9eb2..5b055ed11 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -212,7 +212,7 @@ ALIASES = "only_for_vectors=This is only for vectors (either row- "svd_module=This is defined in the %SVD module. \code #include <Eigen/SVD> \endcode" \ "geometry_module=This is defined in the %Geometry module. \code #include <Eigen/Geometry> \endcode" \ "leastsquares_module=This is defined in the %LeastSquares module. \code #include <Eigen/LeastSquares> \endcode" \ - "eigensolver_module=This is defined in the %EigenSolver module. \code #include <Eigen/EigenSolver> \endcode" \ + "eigenvalues_module=This is defined in the %Eigenvalues module. \code #include <Eigen/Eigenvalues> \endcode" \ "label=\bug" \ "redstar=<a href='#warningarraymodule' style='color:red;text-decoration: none;'>*</a>" \ "nonstableyet=\warning This is not considered to be part of the stable public API yet. Changes may happen in future releases. See \ref Experimental \"Experimental parts of Eigen\"" diff --git a/test/eigensolver_complex.cpp b/test/eigensolver_complex.cpp index db129c064..38ede7c4a 100644 --- a/test/eigensolver_complex.cpp +++ b/test/eigensolver_complex.cpp @@ -23,7 +23,7 @@ // Eigen. If not, see <http://www.gnu.org/licenses/>. #include "main.h" -#include <Eigen/EigenSolver> +#include <Eigen/Eigenvalues> #include <Eigen/LU> template<typename MatrixType> void eigensolver(const MatrixType& m) diff --git a/test/eigensolver_generic.cpp b/test/eigensolver_generic.cpp index 68ee447e9..e2b2055b4 100644 --- a/test/eigensolver_generic.cpp +++ b/test/eigensolver_generic.cpp @@ -23,7 +23,7 @@ // Eigen. If not, see <http://www.gnu.org/licenses/>. #include "main.h" -#include <Eigen/EigenSolver> +#include <Eigen/Eigenvalues> #ifdef HAS_GSL #include "gsl_helper.h" diff --git a/test/eigensolver_selfadjoint.cpp b/test/eigensolver_selfadjoint.cpp index 61d8f1cb5..3836c074b 100644 --- a/test/eigensolver_selfadjoint.cpp +++ b/test/eigensolver_selfadjoint.cpp @@ -23,7 +23,7 @@ // Eigen. If not, see <http://www.gnu.org/licenses/>. #include "main.h" -#include <Eigen/EigenSolver> +#include <Eigen/Eigenvalues> #ifdef HAS_GSL #include "gsl_helper.h" diff --git a/test/mixingtypes.cpp b/test/mixingtypes.cpp index 52e68aba2..690442a02 100644 --- a/test/mixingtypes.cpp +++ b/test/mixingtypes.cpp @@ -95,7 +95,7 @@ void mixingtypes_large(int size) VERIFY_RAISES_ASSERT(mf*vcf); VERIFY_RAISES_ASSERT(mcf*vf); VERIFY_RAISES_ASSERT(mcf *= mf); - // VERIFY_RAISES_ASSERT(vcd = md*vcd); // does not even compile + // VERIFY_RAISES_ASSERT(vcd = md*vcd); // does not even compile (cannot convert complex to double) VERIFY_RAISES_ASSERT(vcf = mcf*vf); VERIFY_RAISES_ASSERT(mf*md); |