Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Register
  • Sign in
  • eigen eigen
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 683
    • Issues 683
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 25
    • Merge requests 25
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libeigenlibeigen
  • eigeneigen
  • Issues
  • #1455
Closed
Open
Issue created Dec 04, 2019 by Eigen Bugzilla@eigenbzReporter

LLT::rankUpdate() requires explicit inclusion of Jacobi module

Submitted by Björn Barz

Assigned to Nobody

Link to original bugzilla bug (#1455)
Version: 3.3 (current stable)

Description

The LLT::rankUpdate() method apparently requires the Jacobi module. This requirement is not documented anywhere and straightforward use of the method without explicitly including Eigen/Jacobi leads to compiler errors.

For example, trying to compile the following code:

#include <Eigen/Core>  
#include <Eigen/Cholesky>  
using namespace Eigen;  

int main(int argc, char * argv[])  
{  
    MatrixXd A = MatrixXd::Random(10, 10);  
    A = A * A.transpose();  
    VectorXd v = VectorXd::Random(10);  

    LLT&lt;MatrixXd&gt; llt(A);  
    llt.rankUpdate(v);  

    return 0;  
}  

This leads to the following compiler errors:

In file included from /home/barz/lib/eigen-3.3.4/Eigen/Cholesky:31:0,  
                 from eigen_test.cc:2:  
/home/barz/lib/eigen-3.3.4/Eigen/src/Cholesky/LLT.h: In instantiation of ‘Eigen::Index Eigen::internal::llt_rank_update_lower(MatrixType&, const VectorType&, const typename MatrixType::RealScalar&) [with MatrixType = Eigen::Matrix<double, -1, -1>; VectorType = Eigen::Matrix<double, -1, 1>; Eigen::Index = long int; typename MatrixType::RealScalar = double]’:  
/home/barz/lib/eigen-3.3.4/Eigen/src/Cholesky/LLT.h:362:66:   required from ‘static Eigen::Index Eigen::internal::llt_inplace<Scalar, 1>::rankUpdate(MatrixType&, const VectorType&, const RealScalar&) [with MatrixType = Eigen::Matrix<double, -1, -1>; VectorType = Eigen::Matrix<double, -1, 1>; Scalar = double; Eigen::Index = long int; Eigen::internal::llt_inplace<Scalar, 1>::RealScalar = double]’  
/home/barz/lib/eigen-3.3.4/Eigen/src/Cholesky/LLT.h:462:91:   required from ‘Eigen::LLT<MatrixType, _UpLo> Eigen::LLT<MatrixType, UpLo>::rankUpdate(const VectorType&, const RealScalar&) [with VectorType = Eigen::Matrix<double, -1, 1>; _MatrixType = Eigen::Matrix<double, -1, -1>; int _UpLo = 1; Eigen::LLT<MatrixType, UpLo>::RealScalar = double]’  
eigen_test.cc:12:21:   required from here  
/home/barz/lib/eigen-3.3.4/Eigen/src/Cholesky/LLT.h:254:30: error: ‘Eigen::JacobiRotation&lt;double&gt; g’ has incomplete type  
       JacobiRotation&lt;Scalar&gt; g;  
                              ^  
/home/barz/lib/eigen-3.3.4/Eigen/src/Cholesky/LLT.h:262:44: error: ‘apply_rotation_in_the_plane’ was not declared in this scope  
         apply_rotation_in_the_plane(x, y, g);  
                                            ^  

Adding "#include <Eigen/Jacobi>" solves this.
This requirement should either be documented or resolved implicitly.

Edited Dec 05, 2019 by Eigen Bugzilla
Assignee
Assign to
Time tracking