Re: [eigen] Regression in LDLT |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Regression in LDLT
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 14 Jun 2011 09:26:09 +0200
- Cc: Sameer Agarwal <sameeragarwal@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=doMrCDfVt6RHT1vEkCb031CtGLIVv1tgkTeV5LjeN4M=; b=vL9cSRGPyvH/3xRCZLhQ9INwnbA0/NWQnfQdhHNzgWJL/1oE5//drFDnPKDk1hKexw AGPexqe9w7tbwBRKyHgMaQEtH4XfRSkq2cEkK/7pnTfEKLr1RPZmNLpDnSwq267Ddnk4 KvO7IbYi4/ODvP51RirHvyGYS12MfPkJjEBLI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=PzjRIG3zsdkj+D9NNUH7+/u9NsLBckXvkYL7MJZh7oQP/3CjU2kiC0fgn/x+ocE6lQ BGMV5SzyXzWXoZc5jrE+W6hcOf2mqyBFqxc6dpkGNEsKCAoWjMCf5kHCt0QBhanL+V0W eUQa6EtTG80gpnyrnUkuGyvQb2cR8BPE3MtMo=
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