Re: [eigen] Regression in LDLT

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


hm, here this is the other way round, i.e., this example compiles fine
with 2.0.13 and higher (including 2.0.15 and 2.0.16) but it fails with
the same error than you with 2.0.12.

gael

On Mon, Jun 13, 2011 at 8:13 AM, Keir Mierle <mierle@xxxxxxxxx> wrote:
> It seems there is a regression in Eigen 2.0.15 and 2.0.16. The following
> code compiles and works fine with 2.0.12:
> #include <Eigen/Core>
> #include <Eigen/Array>
> #include <Eigen/LU>
> #include <Eigen/Cholesky>
> #include <iostream>
> using namespace Eigen;
> typedef Matrix<double, Dynamic, Dynamic, RowMajor> Mat;
> typedef Matrix<double, Dynamic, 1> Vec;
> int main() {
>   Mat A(5, 5);
>   A.setRandom();
>   double bs[] = {1, 2, 3, 4, 5};
>   double xs[5];
>   Map<Vec> b(bs, 5);
>   Map<Vec> x(xs, 5);
>   A.part<UpperTriangular>().ldlt().solve(b, &x);
>   A.lu().solve(b, &x);
>   std::cout << "solution:\n" << x << "\n";
> }
> However, with 2.0.15 or 2.0.16 I get the following error:
> In file included from /usr/include/eigen2/Eigen/Cholesky:36,
>                  from lu_regression.cc:7:
> /usr/include/eigen2/Eigen/src/Cholesky/LDLT.h: In member function ‘const
> Eigen::LDLT<typename Eigen::MatrixBase<Derived>::PlainMatrixType>
> Eigen::MatrixBase<Derived>::ldlt() const [with Derived =
> Eigen::Part<Eigen::Matrix<double, 10000, 10000, 1, 10000, 10000>, 1024u>]’:
> lu_regression.cc:25:   instantiated from here
> /usr/include/eigen2/Eigen/src/Cholesky/LDLT.h:195: error: conversion from
> ‘const Eigen::Part<Eigen::Matrix<double, 10000, 10000, 1, 10000, 10000>,
> 1024u>’ to non-scalar type ‘const Eigen::LDLT<Eigen::Matrix<double, 10000,
> 10000, 3, 10000, 10000> >’ requested
> Any idea what's going on here?
>
> Thanks,
> Keir



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/