This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 949 | Differences between
and this patch

Collapse All | Expand All

 Lines 221-236 Lines 419-434 template struct LDL (-)a/Eigen/src/Cholesky/LDLT.h (+7 lines) 221 ` ` 221 ` ` 222 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 222 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 223 ` template` 223 ` template` 224 ` EIGEN_DEVICE_FUNC` 224 ` EIGEN_DEVICE_FUNC` 225 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 225 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 226 ` #endif` 226 ` #endif` 227 227 228 ` protected:` 228 ` protected:` 229 ` ` 230 ` static void check_template_parameters()` 231 ` {` 232 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 233 ` }` 229 234 230 ` /** \internal` 235 ` /** \internal` 231 ` * Used to compute and store the Cholesky decomposition A = L D L^* = U^* D U.` 236 ` * Used to compute and store the Cholesky decomposition A = L D L^* = U^* D U.` 232 ` * The strict upper part is used during the decomposition, the strict lower` 237 ` * The strict upper part is used during the decomposition, the strict lower` 233 ` * part correspond to the coefficients of L (its diagonal is equal to 1 and` 238 ` * part correspond to the coefficients of L (its diagonal is equal to 1 and` 234 ` * is not stored), and the diagonal entries correspond to D.` 239 ` * is not stored), and the diagonal entries correspond to D.` 235 ` */` 240 ` */` 236 ` MatrixType m_matrix;` 241 ` MatrixType m_matrix;` 419 424 420 `} // end namespace internal` 425 `} // end namespace internal` 421 426 422 `/** Compute / recompute the LDLT decomposition A = L D L^* = U^* D U of \a matrix` 427 `/** Compute / recompute the LDLT decomposition A = L D L^* = U^* D U of \a matrix` 423 ` */` 428 ` */` 424 `template` 429 `template` 425 `LDLT& LDLT::compute(const MatrixType& a)` 430 `LDLT& LDLT::compute(const MatrixType& a)` 426 `{` 431 `{` 432 ` check_template_parameters();` 433 ` ` 427 ` eigen_assert(a.rows()==a.cols());` 434 ` eigen_assert(a.rows()==a.cols());` 428 ` const Index size = a.rows();` 435 ` const Index size = a.rows();` 429 436 430 ` m_matrix = a;` 437 ` m_matrix = a;` 431 438 432 ` m_transpositions.resize(size);` 439 ` m_transpositions.resize(size);` 433 ` m_isInitialized = false;` 440 ` m_isInitialized = false;` 434 ` m_temporary.resize(size);` 441 ` m_temporary.resize(size);`
 Lines 165-180 Lines 372-387 template struct LLT (-)a/Eigen/src/Cholesky/LLT.h (+8 lines) 165 ` ` 165 ` ` 166 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 166 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 167 ` template` 167 ` template` 168 ` EIGEN_DEVICE_FUNC` 168 ` EIGEN_DEVICE_FUNC` 169 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 169 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 170 ` #endif` 170 ` #endif` 171 171 172 ` protected:` 172 ` protected:` 173 ` ` 174 ` static void check_template_parameters()` 175 ` {` 176 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 177 ` }` 178 ` ` 173 ` /** \internal` 179 ` /** \internal` 174 ` * Used to compute and store L` 180 ` * Used to compute and store L` 175 ` * The strict upper part is not used and even not initialized.` 181 ` * The strict upper part is not used and even not initialized.` 176 ` */` 182 ` */` 177 ` MatrixType m_matrix;` 183 ` MatrixType m_matrix;` 178 ` bool m_isInitialized;` 184 ` bool m_isInitialized;` 179 ` ComputationInfo m_info;` 185 ` ComputationInfo m_info;` 180 `};` 186 `};` 372 ` * \returns a reference to *this` 378 ` * \returns a reference to *this` 373 ` *` 379 ` *` 374 ` * Example: \include TutorialLinAlgComputeTwice.cpp` 380 ` * Example: \include TutorialLinAlgComputeTwice.cpp` 375 ` * Output: \verbinclude TutorialLinAlgComputeTwice.out` 381 ` * Output: \verbinclude TutorialLinAlgComputeTwice.out` 376 ` */` 382 ` */` 377 `template` 383 `template` 378 `LLT& LLT::compute(const MatrixType& a)` 384 `LLT& LLT::compute(const MatrixType& a)` 379 `{` 385 `{` 386 ` check_template_parameters();` 387 ` ` 380 ` eigen_assert(a.rows()==a.cols());` 388 ` eigen_assert(a.rows()==a.cols());` 381 ` const Index size = a.rows();` 389 ` const Index size = a.rows();` 382 ` m_matrix.resize(size, size);` 390 ` m_matrix.resize(size, size);` 383 ` m_matrix = a;` 391 ` m_matrix = a;` 384 392 385 ` m_isInitialized = true;` 393 ` m_isInitialized = true;` 386 ` bool ok = Traits::inplace_decomposition(m_matrix);` 394 ` bool ok = Traits::inplace_decomposition(m_matrix);` 387 ` m_info = ok ? Success : NumericalIssue;` 395 ` m_info = ok ? Success : NumericalIssue;`
 Lines 229-244 Lines 246-261 template class Com template class Com (-)a/Eigen/src/Eigenvalues/ComplexEigenSolver.h (+8 lines) 229 229 230 ` /** \brief Returns the maximum number of iterations. */` 230 ` /** \brief Returns the maximum number of iterations. */` 231 ` Index getMaxIterations()` 231 ` Index getMaxIterations()` 232 ` {` 232 ` {` 233 ` return m_schur.getMaxIterations();` 233 ` return m_schur.getMaxIterations();` 234 ` }` 234 ` }` 235 235 236 ` protected:` 236 ` protected:` 237 ` ` 238 ` static void check_template_parameters()` 239 ` {` 240 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 241 ` }` 242 ` ` 237 ` EigenvectorType m_eivec;` 243 ` EigenvectorType m_eivec;` 238 ` EigenvalueType m_eivalues;` 244 ` EigenvalueType m_eivalues;` 239 ` ComplexSchur m_schur;` 245 ` ComplexSchur m_schur;` 240 ` bool m_isInitialized;` 246 ` bool m_isInitialized;` 241 ` bool m_eigenvectorsOk;` 247 ` bool m_eigenvectorsOk;` 242 ` EigenvectorType m_matX;` 248 ` EigenvectorType m_matX;` 243 249 244 ` private:` 250 ` private:` 246 ` void sortEigenvalues(bool computeEigenvectors);` 252 ` void sortEigenvalues(bool computeEigenvectors);` 247 `};` 253 `};` 248 254 249 255 250 `template` 256 `template` 251 `ComplexEigenSolver& ` 257 `ComplexEigenSolver& ` 252 `ComplexEigenSolver::compute(const MatrixType& matrix, bool computeEigenvectors)` 258 `ComplexEigenSolver::compute(const MatrixType& matrix, bool computeEigenvectors)` 253 `{` 259 `{` 260 ` check_template_parameters();` 261 ` ` 254 ` // this code is inspired from Jampack` 262 ` // this code is inspired from Jampack` 255 ` eigen_assert(matrix.cols() == matrix.rows());` 263 ` eigen_assert(matrix.cols() == matrix.rows());` 256 264 257 ` // Do a complex Schur decomposition, A = U T U^*` 265 ` // Do a complex Schur decomposition, A = U T U^*` 258 ` // The eigenvalues are on the diagonal of T.` 266 ` // The eigenvalues are on the diagonal of T.` 259 ` m_schur.compute(matrix, computeEigenvectors);` 267 ` m_schur.compute(matrix, computeEigenvectors);` 260 268 261 ` if(m_schur.info() == Success)` 269 ` if(m_schur.info() == Success)`
 Lines 294-309 Lines 361-376 template class Eig typename EigenSolver::Eigenv (-)a/Eigen/src/Eigenvalues/EigenSolver.h (+9 lines) 294 ` {` 294 ` {` 295 ` return m_realSchur.getMaxIterations();` 295 ` return m_realSchur.getMaxIterations();` 296 ` }` 296 ` }` 297 297 298 ` private:` 298 ` private:` 299 ` void doComputeEigenvectors();` 299 ` void doComputeEigenvectors();` 300 300 301 ` protected:` 301 ` protected:` 302 ` ` 303 ` static void check_template_parameters()` 304 ` {` 305 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 306 ` EIGEN_STATIC_ASSERT(!NumTraits::IsComplex, NUMERIC_TYPE_MUST_BE_REAL);` 307 ` }` 308 ` ` 302 ` MatrixType m_eivec;` 309 ` MatrixType m_eivec;` 303 ` EigenvalueType m_eivalues;` 310 ` EigenvalueType m_eivalues;` 304 ` bool m_isInitialized;` 311 ` bool m_isInitialized;` 305 ` bool m_eigenvectorsOk;` 312 ` bool m_eigenvectorsOk;` 306 ` ComputationInfo m_info;` 313 ` ComputationInfo m_info;` 307 ` RealSchur m_realSchur;` 314 ` RealSchur m_realSchur;` 308 ` MatrixType m_matT;` 315 ` MatrixType m_matT;` 309 316 361 ` }` 368 ` }` 362 ` return matV;` 369 ` return matV;` 363 `}` 370 `}` 364 371 365 `template` 372 `template` 366 `EigenSolver& ` 373 `EigenSolver& ` 367 `EigenSolver::compute(const MatrixType& matrix, bool computeEigenvectors)` 374 `EigenSolver::compute(const MatrixType& matrix, bool computeEigenvectors)` 368 `{` 375 `{` 376 ` check_template_parameters();` 377 ` ` 369 ` using std::sqrt;` 378 ` using std::sqrt;` 370 ` using std::abs;` 379 ` using std::abs;` 371 ` using numext::isfinite;` 380 ` using numext::isfinite;` 372 ` eigen_assert(matrix.cols() == matrix.rows());` 381 ` eigen_assert(matrix.cols() == matrix.rows());` 373 382 374 ` // Reduce to real Schur form.` 383 ` // Reduce to real Schur form.` 375 ` m_realSchur.compute(matrix, computeEigenvectors);` 384 ` m_realSchur.compute(matrix, computeEigenvectors);` 376 ` ` 385 ` `
 Lines 258-273 Lines 285-300 template class Gen template class Gen (-)a/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h (+9 lines) 258 ` */` 258 ` */` 259 ` GeneralizedEigenSolver& setMaxIterations(Index maxIters)` 259 ` GeneralizedEigenSolver& setMaxIterations(Index maxIters)` 260 ` {` 260 ` {` 261 ` m_realQZ.setMaxIterations(maxIters);` 261 ` m_realQZ.setMaxIterations(maxIters);` 262 ` return *this;` 262 ` return *this;` 263 ` }` 263 ` }` 264 264 265 ` protected:` 265 ` protected:` 266 ` ` 267 ` static void check_template_parameters()` 268 ` {` 269 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 270 ` EIGEN_STATIC_ASSERT(!NumTraits::IsComplex, NUMERIC_TYPE_MUST_BE_REAL);` 271 ` }` 272 ` ` 266 ` MatrixType m_eivec;` 273 ` MatrixType m_eivec;` 267 ` ComplexVectorType m_alphas;` 274 ` ComplexVectorType m_alphas;` 268 ` VectorType m_betas;` 275 ` VectorType m_betas;` 269 ` bool m_isInitialized;` 276 ` bool m_isInitialized;` 270 ` bool m_eigenvectorsOk;` 277 ` bool m_eigenvectorsOk;` 271 ` RealQZ m_realQZ;` 278 ` RealQZ m_realQZ;` 272 ` MatrixType m_matS;` 279 ` MatrixType m_matS;` 273 280 285 `// // TODO` 292 `// // TODO` 286 `// return matV;` 293 `// return matV;` 287 `//}` 294 `//}` 288 295 289 `template` 296 `template` 290 `GeneralizedEigenSolver&` 297 `GeneralizedEigenSolver&` 291 `GeneralizedEigenSolver::compute(const MatrixType& A, const MatrixType& B, bool computeEigenvectors)` 298 `GeneralizedEigenSolver::compute(const MatrixType& A, const MatrixType& B, bool computeEigenvectors)` 292 `{` 299 `{` 300 ` check_template_parameters();` 301 ` ` 293 ` using std::sqrt;` 302 ` using std::sqrt;` 294 ` using std::abs;` 303 ` using std::abs;` 295 ` eigen_assert(A.cols() == A.rows() && B.cols() == A.rows() && B.cols() == B.rows());` 304 ` eigen_assert(A.cols() == A.rows() && B.cols() == A.rows() && B.cols() == B.rows());` 296 305 297 ` // Reduce to generalized real Schur form:` 306 ` // Reduce to generalized real Schur form:` 298 ` // A = Q S Z and B = Q T Z` 307 ` // A = Q S Z and B = Q T Z` 299 ` m_realQZ.compute(A, B, computeEigenvectors);` 308 ` m_realQZ.compute(A, B, computeEigenvectors);` 300 309
 Lines 342-357 Lines 377-392 template class Sel EIGEN_DEVICE_FUNC (-)a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h (+7 lines) 342 ` /** \brief Maximum number of iterations.` 342 ` /** \brief Maximum number of iterations.` 343 ` *` 343 ` *` 344 ` * The algorithm terminates if it does not converge within m_maxIterations * n iterations, where n` 344 ` * The algorithm terminates if it does not converge within m_maxIterations * n iterations, where n` 345 ` * denotes the size of the matrix. This value is currently set to 30 (copied from LAPACK).` 345 ` * denotes the size of the matrix. This value is currently set to 30 (copied from LAPACK).` 346 ` */` 346 ` */` 347 ` static const int m_maxIterations = 30;` 347 ` static const int m_maxIterations = 30;` 348 348 349 ` protected:` 349 ` protected:` 350 ` static void check_template_parameters()` 351 ` {` 352 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 353 ` }` 354 ` ` 350 ` MatrixType m_eivec;` 355 ` MatrixType m_eivec;` 351 ` RealVectorType m_eivalues;` 356 ` RealVectorType m_eivalues;` 352 ` typename TridiagonalizationType::SubDiagonalType m_subdiag;` 357 ` typename TridiagonalizationType::SubDiagonalType m_subdiag;` 353 ` ComputationInfo m_info;` 358 ` ComputationInfo m_info;` 354 ` bool m_isInitialized;` 359 ` bool m_isInitialized;` 355 ` bool m_eigenvectorsOk;` 360 ` bool m_eigenvectorsOk;` 356 `};` 361 `};` 357 362 377 `static void tridiagonal_qr_step(RealScalar* diag, RealScalar* subdiag, Index start, Index end, Scalar* matrixQ, Index n);` 382 `static void tridiagonal_qr_step(RealScalar* diag, RealScalar* subdiag, Index start, Index end, Scalar* matrixQ, Index n);` 378 `}` 383 `}` 379 384 380 `template` 385 `template` 381 `EIGEN_DEVICE_FUNC` 386 `EIGEN_DEVICE_FUNC` 382 `SelfAdjointEigenSolver& SelfAdjointEigenSolver` 387 `SelfAdjointEigenSolver& SelfAdjointEigenSolver` 383 `::compute(const MatrixType& matrix, int options)` 388 `::compute(const MatrixType& matrix, int options)` 384 `{` 389 `{` 390 ` check_template_parameters();` 391 ` ` 385 ` using std::abs;` 392 ` using std::abs;` 386 ` eigen_assert(matrix.cols() == matrix.rows());` 393 ` eigen_assert(matrix.cols() == matrix.rows());` 387 ` eigen_assert((options&~(EigVecMask|GenEigMask))==0` 394 ` eigen_assert((options&~(EigVecMask|GenEigMask))==0` 388 ` && (options&EigVecMask)!=EigVecMask` 395 ` && (options&EigVecMask)!=EigVecMask` 389 ` && "invalid option parameter");` 396 ` && "invalid option parameter");` 390 ` bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors;` 397 ` bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors;` 391 ` Index n = matrix.cols();` 398 ` Index n = matrix.cols();` 392 ` m_eivalues.resize(n,1);` 399 ` m_eivalues.resize(n,1);`
 Lines 385-400 Lines 429-444 template class Ful FullPivLU::FullPivLU(const M (-)a/Eigen/src/LU/FullPivLU.h (+8 lines) 385 ` ` 385 ` ` 386 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 386 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 387 ` template` 387 ` template` 388 ` EIGEN_DEVICE_FUNC` 388 ` EIGEN_DEVICE_FUNC` 389 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 389 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 390 ` #endif` 390 ` #endif` 391 391 392 ` protected:` 392 ` protected:` 393 ` ` 394 ` static void check_template_parameters()` 395 ` {` 396 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 397 ` }` 398 ` ` 393 ` MatrixType m_lu;` 399 ` MatrixType m_lu;` 394 ` PermutationPType m_p;` 400 ` PermutationPType m_p;` 395 ` PermutationQType m_q;` 401 ` PermutationQType m_q;` 396 ` IntColVectorType m_rowsTranspositions;` 402 ` IntColVectorType m_rowsTranspositions;` 397 ` IntRowVectorType m_colsTranspositions;` 403 ` IntRowVectorType m_colsTranspositions;` 398 ` Index m_det_pq, m_nonzero_pivots;` 404 ` Index m_det_pq, m_nonzero_pivots;` 399 ` RealScalar m_maxpivot, m_prescribedThreshold;` 405 ` RealScalar m_maxpivot, m_prescribedThreshold;` 400 ` bool m_isInitialized, m_usePrescribedThreshold;` 406 ` bool m_isInitialized, m_usePrescribedThreshold;` 429 ` m_usePrescribedThreshold(false)` 435 ` m_usePrescribedThreshold(false)` 430 `{` 436 `{` 431 ` compute(matrix);` 437 ` compute(matrix);` 432 `}` 438 `}` 433 439 434 `template` 440 `template` 435 `FullPivLU& FullPivLU::compute(const MatrixType& matrix)` 441 `FullPivLU& FullPivLU::compute(const MatrixType& matrix)` 436 `{` 442 `{` 443 ` check_template_parameters();` 444 ` ` 437 ` // the permutations are stored as int indices, so just to be sure:` 445 ` // the permutations are stored as int indices, so just to be sure:` 438 ` eigen_assert(matrix.rows()<=NumTraits::highest() && matrix.cols()<=NumTraits::highest());` 446 ` eigen_assert(matrix.rows()<=NumTraits::highest() && matrix.cols()<=NumTraits::highest());` 439 ` ` 447 ` ` 440 ` m_isInitialized = true;` 448 ` m_isInitialized = true;` 441 ` m_lu = matrix;` 449 ` m_lu = matrix;` 442 450 443 ` const Index size = matrix.diagonalSize();` 451 ` const Index size = matrix.diagonalSize();` 444 ` const Index rows = matrix.rows();` 452 ` const Index rows = matrix.rows();`
 Lines 204-219 Lines 420-435 template class Par void partial_lu_inplace(MatrixType& lu, (-)a/Eigen/src/LU/PartialPivLU.h (+8 lines) 204 ` m_lu.template triangularView().solveInPlace(dst);` 204 ` m_lu.template triangularView().solveInPlace(dst);` 205 205 206 ` // Step 3` 206 ` // Step 3` 207 ` m_lu.template triangularView().solveInPlace(dst); ` 207 ` m_lu.template triangularView().solveInPlace(dst); ` 208 ` }` 208 ` }` 209 ` #endif` 209 ` #endif` 210 210 211 ` protected:` 211 ` protected:` 212 ` ` 213 ` static void check_template_parameters()` 214 ` {` 215 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 216 ` }` 217 ` ` 212 ` MatrixType m_lu;` 218 ` MatrixType m_lu;` 213 ` PermutationType m_p;` 219 ` PermutationType m_p;` 214 ` TranspositionType m_rowsTranspositions;` 220 ` TranspositionType m_rowsTranspositions;` 215 ` Index m_det_p;` 221 ` Index m_det_p;` 216 ` bool m_isInitialized;` 222 ` bool m_isInitialized;` 217 `};` 223 `};` 218 224 219 `template` 225 `template` 420 ` ::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.outerStride(), &row_transpositions.coeffRef(0), nb_transpositions);` 426 ` ::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.outerStride(), &row_transpositions.coeffRef(0), nb_transpositions);` 421 `}` 427 `}` 422 428 423 `} // end namespace internal` 429 `} // end namespace internal` 424 430 425 `template` 431 `template` 426 `PartialPivLU& PartialPivLU::compute(const MatrixType& matrix)` 432 `PartialPivLU& PartialPivLU::compute(const MatrixType& matrix)` 427 `{` 433 `{` 434 ` check_template_parameters();` 435 ` ` 428 ` // the row permutation is stored as int indices, so just to be sure:` 436 ` // the row permutation is stored as int indices, so just to be sure:` 429 ` eigen_assert(matrix.rows()::highest());` 437 ` eigen_assert(matrix.rows()::highest());` 430 ` ` 438 ` ` 431 ` m_lu = matrix;` 439 ` m_lu = matrix;` 432 440 433 ` eigen_assert(matrix.rows() == matrix.cols() && "PartialPivLU is only for square (and moreover invertible) matrices");` 441 ` eigen_assert(matrix.rows() == matrix.cols() && "PartialPivLU is only for square (and moreover invertible) matrices");` 434 ` const Index size = matrix.rows();` 442 ` const Index size = matrix.rows();` 435 443
 Lines 393-408 Lines 431-446 template class Col typename MatrixType::RealScalar ColPivHo (-)a/Eigen/src/QR/ColPivHouseholderQR.h (+8 lines) 393 ` ` 393 ` ` 394 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 394 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 395 ` template` 395 ` template` 396 ` EIGEN_DEVICE_FUNC` 396 ` EIGEN_DEVICE_FUNC` 397 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 397 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 398 ` #endif` 398 ` #endif` 399 399 400 ` protected:` 400 ` protected:` 401 ` ` 402 ` static void check_template_parameters()` 403 ` {` 404 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 405 ` }` 406 ` ` 401 ` MatrixType m_qr;` 407 ` MatrixType m_qr;` 402 ` HCoeffsType m_hCoeffs;` 408 ` HCoeffsType m_hCoeffs;` 403 ` PermutationType m_colsPermutation;` 409 ` PermutationType m_colsPermutation;` 404 ` IntRowVectorType m_colsTranspositions;` 410 ` IntRowVectorType m_colsTranspositions;` 405 ` RowVectorType m_temp;` 411 ` RowVectorType m_temp;` 406 ` RealRowVectorType m_colSqNorms;` 412 ` RealRowVectorType m_colSqNorms;` 407 ` bool m_isInitialized, m_usePrescribedThreshold;` 413 ` bool m_isInitialized, m_usePrescribedThreshold;` 408 ` RealScalar m_prescribedThreshold, m_maxpivot;` 414 ` RealScalar m_prescribedThreshold, m_maxpivot;` 431 ` * the factorization is stored into \c *this, and a reference to \c *this` 437 ` * the factorization is stored into \c *this, and a reference to \c *this` 432 ` * is returned.` 438 ` * is returned.` 433 ` *` 439 ` *` 434 ` * \sa class ColPivHouseholderQR, ColPivHouseholderQR(const MatrixType&)` 440 ` * \sa class ColPivHouseholderQR, ColPivHouseholderQR(const MatrixType&)` 435 ` */` 441 ` */` 436 `template` 442 `template` 437 `ColPivHouseholderQR& ColPivHouseholderQR::compute(const MatrixType& matrix)` 443 `ColPivHouseholderQR& ColPivHouseholderQR::compute(const MatrixType& matrix)` 438 `{` 444 `{` 445 ` check_template_parameters();` 446 ` ` 439 ` using std::abs;` 447 ` using std::abs;` 440 ` Index rows = matrix.rows();` 448 ` Index rows = matrix.rows();` 441 ` Index cols = matrix.cols();` 449 ` Index cols = matrix.cols();` 442 ` Index size = matrix.diagonalSize();` 450 ` Index size = matrix.diagonalSize();` 443 ` ` 451 ` ` 444 ` // the column permutation is stored as int indices, so just to be sure:` 452 ` // the column permutation is stored as int indices, so just to be sure:` 445 ` eigen_assert(cols<=NumTraits::highest());` 453 ` eigen_assert(cols<=NumTraits::highest());` 446 454
 Lines 375-390 Lines 414-429 template class Ful typename MatrixType::RealScalar FullPivH (-)a/Eigen/src/QR/FullPivHouseholderQR.h (+8 lines) 375 ` ` 375 ` ` 376 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 376 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 377 ` template` 377 ` template` 378 ` EIGEN_DEVICE_FUNC` 378 ` EIGEN_DEVICE_FUNC` 379 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 379 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 380 ` #endif` 380 ` #endif` 381 381 382 ` protected:` 382 ` protected:` 383 ` ` 384 ` static void check_template_parameters()` 385 ` {` 386 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 387 ` }` 388 ` ` 383 ` MatrixType m_qr;` 389 ` MatrixType m_qr;` 384 ` HCoeffsType m_hCoeffs;` 390 ` HCoeffsType m_hCoeffs;` 385 ` IntDiagSizeVectorType m_rows_transpositions;` 391 ` IntDiagSizeVectorType m_rows_transpositions;` 386 ` IntDiagSizeVectorType m_cols_transpositions;` 392 ` IntDiagSizeVectorType m_cols_transpositions;` 387 ` PermutationType m_cols_permutation;` 393 ` PermutationType m_cols_permutation;` 388 ` RowVectorType m_temp;` 394 ` RowVectorType m_temp;` 389 ` bool m_isInitialized, m_usePrescribedThreshold;` 395 ` bool m_isInitialized, m_usePrescribedThreshold;` 390 ` RealScalar m_prescribedThreshold, m_maxpivot;` 396 ` RealScalar m_prescribedThreshold, m_maxpivot;` 414 ` * the factorization is stored into \c *this, and a reference to \c *this` 420 ` * the factorization is stored into \c *this, and a reference to \c *this` 415 ` * is returned.` 421 ` * is returned.` 416 ` *` 422 ` *` 417 ` * \sa class FullPivHouseholderQR, FullPivHouseholderQR(const MatrixType&)` 423 ` * \sa class FullPivHouseholderQR, FullPivHouseholderQR(const MatrixType&)` 418 ` */` 424 ` */` 419 `template` 425 `template` 420 `FullPivHouseholderQR& FullPivHouseholderQR::compute(const MatrixType& matrix)` 426 `FullPivHouseholderQR& FullPivHouseholderQR::compute(const MatrixType& matrix)` 421 `{` 427 `{` 428 ` check_template_parameters();` 429 ` ` 422 ` using std::abs;` 430 ` using std::abs;` 423 ` Index rows = matrix.rows();` 431 ` Index rows = matrix.rows();` 424 ` Index cols = matrix.cols();` 432 ` Index cols = matrix.cols();` 425 ` Index size = (std::min)(rows,cols);` 433 ` Index size = (std::min)(rows,cols);` 426 434 427 ` m_qr = matrix;` 435 ` m_qr = matrix;` 428 ` m_hCoeffs.resize(size);` 436 ` m_hCoeffs.resize(size);` 429 437
 Lines 191-206 Lines 343-358 template class Hou void HouseholderQR<_MatrixType>::_solve_ (-)a/Eigen/src/QR/HouseholderQR.h (+8 lines) 191 ` ` 191 ` ` 192 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 192 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 193 ` template` 193 ` template` 194 ` EIGEN_DEVICE_FUNC` 194 ` EIGEN_DEVICE_FUNC` 195 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 195 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 196 ` #endif` 196 ` #endif` 197 197 198 ` protected:` 198 ` protected:` 199 ` ` 200 ` static void check_template_parameters()` 201 ` {` 202 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 203 ` }` 204 ` ` 199 ` MatrixType m_qr;` 205 ` MatrixType m_qr;` 200 ` HCoeffsType m_hCoeffs;` 206 ` HCoeffsType m_hCoeffs;` 201 ` RowVectorType m_temp;` 207 ` RowVectorType m_temp;` 202 ` bool m_isInitialized;` 208 ` bool m_isInitialized;` 203 `};` 209 `};` 204 210 205 `template` 211 `template` 206 `typename MatrixType::RealScalar HouseholderQR::absDeterminant() const` 212 `typename MatrixType::RealScalar HouseholderQR::absDeterminant() const` 343 ` * the factorization is stored into \c *this, and a reference to \c *this` 349 ` * the factorization is stored into \c *this, and a reference to \c *this` 344 ` * is returned.` 350 ` * is returned.` 345 ` *` 351 ` *` 346 ` * \sa class HouseholderQR, HouseholderQR(const MatrixType&)` 352 ` * \sa class HouseholderQR, HouseholderQR(const MatrixType&)` 347 ` */` 353 ` */` 348 `template` 354 `template` 349 `HouseholderQR& HouseholderQR::compute(const MatrixType& matrix)` 355 `HouseholderQR& HouseholderQR::compute(const MatrixType& matrix)` 350 `{` 356 `{` 357 ` check_template_parameters();` 358 ` ` 351 ` Index rows = matrix.rows();` 359 ` Index rows = matrix.rows();` 352 ` Index cols = matrix.cols();` 360 ` Index cols = matrix.cols();` 353 ` Index size = (std::min)(rows,cols);` 361 ` Index size = (std::min)(rows,cols);` 354 362 355 ` m_qr = matrix;` 363 ` m_qr = matrix;` 356 ` m_hCoeffs.resize(size);` 364 ` m_hCoeffs.resize(size);` 357 365 358 ` m_temp.resize(cols);` 366 ` m_temp.resize(cols);`
 Lines 212-227 Lines 235-251 public: protected: (-)a/Eigen/src/SVD/SVDBase.h (-1 / +9 lines) 212 ` ` 212 ` ` 213 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 213 ` #ifndef EIGEN_PARSED_BY_DOXYGEN` 214 ` template` 214 ` template` 215 ` EIGEN_DEVICE_FUNC` 215 ` EIGEN_DEVICE_FUNC` 216 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 216 ` void _solve_impl(const RhsType &rhs, DstType &dst) const;` 217 ` #endif` 217 ` #endif` 218 218 219 `protected:` 219 `protected:` 220 ` ` 221 ` static void check_template_parameters()` 222 ` {` 223 ` EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar);` 224 ` }` 225 ` ` 220 ` // return true if already allocated` 226 ` // return true if already allocated` 221 ` bool allocate(Index rows, Index cols, unsigned int computationOptions) ;` 227 ` bool allocate(Index rows, Index cols, unsigned int computationOptions) ;` 222 228 223 ` MatrixUType m_matrixU;` 229 ` MatrixUType m_matrixU;` 224 ` MatrixVType m_matrixV;` 230 ` MatrixVType m_matrixV;` 225 ` SingularValuesType m_singularValues;` 231 ` SingularValuesType m_singularValues;` 226 ` bool m_isInitialized, m_isAllocated, m_usePrescribedThreshold;` 232 ` bool m_isInitialized, m_isAllocated, m_usePrescribedThreshold;` 227 ` bool m_computeFullU, m_computeThinU;` 233 ` bool m_computeFullU, m_computeThinU;` 235 ` * Default constructor of SVDBase` 241 ` * Default constructor of SVDBase` 236 ` */` 242 ` */` 237 ` SVDBase()` 243 ` SVDBase()` 238 ` : m_isInitialized(false),` 244 ` : m_isInitialized(false),` 239 ` m_isAllocated(false),` 245 ` m_isAllocated(false),` 240 ` m_usePrescribedThreshold(false),` 246 ` m_usePrescribedThreshold(false),` 241 ` m_computationOptions(0),` 247 ` m_computationOptions(0),` 242 ` m_rows(-1), m_cols(-1), m_diagSize(0)` 248 ` m_rows(-1), m_cols(-1), m_diagSize(0)` 243 ` {}` 249 ` {` 250 ` check_template_parameters();` 251 ` }` 244 252 245 253 246 `};` 254 `};` 247 255 248 `#ifndef EIGEN_PARSED_BY_DOXYGEN` 256 `#ifndef EIGEN_PARSED_BY_DOXYGEN` 249 `template` 257 `template` 250 `template` 258 `template` 251 `void SVDBase::_solve_impl(const RhsType &rhs, DstType &dst) const` 259 `void SVDBase::_solve_impl(const RhsType &rhs, DstType &dst) const`
 Lines 42-57 ei_add_failtest("swap_1") (-)a/failtest/CMakeLists.txt (+12 lines) 42 `ei_add_failtest("swap_2")` 42 `ei_add_failtest("swap_2")` 43 43 44 `ei_add_failtest("sparse_ref_1")` 44 `ei_add_failtest("sparse_ref_1")` 45 `ei_add_failtest("sparse_ref_2")` 45 `ei_add_failtest("sparse_ref_2")` 46 `ei_add_failtest("sparse_ref_3")` 46 `ei_add_failtest("sparse_ref_3")` 47 `ei_add_failtest("sparse_ref_4")` 47 `ei_add_failtest("sparse_ref_4")` 48 `ei_add_failtest("sparse_ref_5")` 48 `ei_add_failtest("sparse_ref_5")` 49 49 50 `ei_add_failtest("partialpivlu_int")` 51 `ei_add_failtest("fullpivlu_int")` 52 `ei_add_failtest("llt_int")` 53 `ei_add_failtest("ldlt_int")` 54 `ei_add_failtest("qr_int")` 55 `ei_add_failtest("colpivqr_int")` 56 `ei_add_failtest("fullpivqr_int")` 57 `ei_add_failtest("jacobisvd_int")` 58 `ei_add_failtest("bdcsvd_int")` 59 `ei_add_failtest("eigensolver_int")` 60 `ei_add_failtest("eigensolver_cplx")` 61 50 `if (EIGEN_FAILTEST_FAILURE_COUNT)` 62 `if (EIGEN_FAILTEST_FAILURE_COUNT)` 51 ` message(FATAL_ERROR` 63 ` message(FATAL_ERROR` 52 ` "\${EIGEN_FAILTEST_FAILURE_COUNT} out of \${EIGEN_FAILTEST_COUNT} failtests FAILED. "` 64 ` "\${EIGEN_FAILTEST_FAILURE_COUNT} out of \${EIGEN_FAILTEST_COUNT} failtests FAILED. "` 53 ` "To debug these failures, manually compile these programs in \${CMAKE_CURRENT_SOURCE_DIR}, "` 65 ` "To debug these failures, manually compile these programs in \${CMAKE_CURRENT_SOURCE_DIR}, "` 54 ` "with and without #define EIGEN_SHOULD_FAIL_TO_BUILD.")` 66 ` "with and without #define EIGEN_SHOULD_FAIL_TO_BUILD.")` 55 `else()` 67 `else()` 56 ` message(STATUS "Failtest SUCCESS: all \${EIGEN_FAILTEST_COUNT} failtests passed.")` 68 ` message(STATUS "Failtest SUCCESS: all \${EIGEN_FAILTEST_COUNT} failtests passed.")` 57 ` message(STATUS "")` 69 ` message(STATUS "")`
 Line 0 (-)a/failtest/bdcsvd_int.cpp (+14 lines) 1 `#include "../Eigen/SVD"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` BDCSVD > qr(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/colpivqr_int.cpp (+14 lines) 1 `#include "../Eigen/QR"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` ColPivHouseholderQR > qr(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/eigensolver_cplx.cpp (+14 lines) 1 `#include "../Eigen/Eigenvalues"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR std::complex` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` EigenSolver > eig(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/eigensolver_int.cpp (+14 lines) 1 `#include "../Eigen/Eigenvalues"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` EigenSolver > eig(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/fullpivlu_int.cpp (+14 lines) 1 `#include "../Eigen/LU"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` FullPivLU > lu(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/fullpivqr_int.cpp (+14 lines) 1 `#include "../Eigen/QR"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` FullPivHouseholderQR > qr(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/jacobisvd_int.cpp (+14 lines) 1 `#include "../Eigen/SVD"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` JacobiSVD > qr(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/ldlt_int.cpp (+14 lines) 1 `#include "../Eigen/Cholesky"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` LDLT > ldlt(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/llt_int.cpp (+14 lines) 1 `#include "../Eigen/Cholesky"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` LLT > llt(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/partialpivlu_int.cpp (+14 lines) 1 `#include "../Eigen/LU"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` PartialPivLU > lu(Matrix::Random(10,10));` 14 `}`
 Line 0 (-)a/failtest/qr_int.cpp (+14 lines) 1 `#include "../Eigen/QR"` 2 3 `#ifdef EIGEN_SHOULD_FAIL_TO_BUILD` 4 `#define SCALAR int` 5 `#else` 6 `#define SCALAR float` 7 `#endif` 8 9 `using namespace Eigen;` 10 11 `int main()` 12 `{` 13 ` HouseholderQR > qr(Matrix::Random(10,10));` 14 `}`