Re: [eigen] TriangularView::coeff() fails to compile |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] TriangularView::coeff() fails to compile
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Sat, 10 Jul 2010 22:38:35 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=TQCthYHoFP2AqdhLXqgwFoKcBv3eiOYAX5iznoNxp5k=; b=Q/WQEReVxfjtwr0RL/bI5AcCpjXRcYFzp0NGmcwOuUxj8Z0HH5EwqqQXoZqbypj2q6 27FPphu1LM8+YuzH2RUszq6IFjfAzfe+G9LNQpMWwIo+yVFMzjsxlazphdAWvcprLzIY Rdz/vP7oAFyIcGJ9hTV90DY1QaI0DHYaaZZLM=
- 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 :content-type:content-transfer-encoding; b=v/RvzCkZstZ/NrI6auVkfGhwVI3ILCwX2RoD85jEa/JhWzQ4iwoO2VzWSdBdojAk5n cwob9hUXDQlnoLL/iIpJOX76Ngmdbh3wwQVRhjr9mQSyUidP7Jj1T2n4WgMfg8F5uvxa M3bq0VOKTsNytgeLtU1bkB5YvvzGNHzJWos6Y=
thank you for the report and, more importantly, for the fix :)
I've just committed this change.
gael
On Sat, Jul 10, 2010 at 9:46 PM, Martin Senst <martin.senst@xxxxxx> wrote:
> It actually works when the methods check_coordinates() and
> check_coordinates_internal() in file TriangularMatrix.h, lines 92, 104 and 109
> are declared as const.
>
> Cheers
> Martin
>
>
>
> Am Samstag 10 Juli 2010, 21:39:29 schrieb Martin Senst:
>> Hello,
>>
>> the following program, with Eigen3
>>
>> #include <Eigen/Eigen>
>>
>> int main()
>> {
>> Eigen::MatrixXd X(2, 2);
>> X.triangularView<Eigen::Upper>().coeff(0, 0);
>> }
>>
>>
>> results in the compiler error (sorry that it's in German)
>>
>>
>> In file included from ../eigen/Eigen/Core:278:0,
>> from ../eigen/Eigen/Dense:1,
>> from ../eigen/Eigen/Eigen:1,
>> from test.cpp:1:
>> ../eigen/Eigen/src/Core/TriangularMatrix.h: In Elementfunktion
>> »Eigen::TriangularView<MatrixType, Mode>::Scalar
>> Eigen::TriangularView<MatrixType,
>> Mode>::coeff(Eigen::TriangularView<MatrixType, Mode>::Index,
>> Eigen::TriangularView<MatrixType, Mode>::Index) const [with _MatrixType =
>> Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, unsigned
>> int _Mode = 2u, Eigen::TriangularView<MatrixType, Mode>::Scalar = double,
>> Eigen::TriangularView<MatrixType, Mode>::Index = long int]«:
>> test.cpp:6:46: instantiated from here
>> ../eigen/Eigen/src/Core/TriangularMatrix.h:204:7: Fehler: Die Übergabe von
>> »const Eigen::TriangularView<Eigen::Matrix<double, -0x00000000000000001,
>> -0x00000000000000001>, 2u>« als »this«-Argument von »void
>> Eigen::TriangularBase<Derived>::check_coordinates_internal(Eigen::Triangula
>> rBase<Derived>::Index, Eigen::TriangularBase<Derived>::Index) [with Derived
>> =
>> Eigen::TriangularView<Eigen::Matrix<double, -0x00000000000000001,
>> -0x00000000000000001>, 2u>, Eigen::TriangularBase<Derived>::Index = long
>> int]« streicht Qualifizierer
>>
>>
>> Is this a bug? Since coeff() only reads from the triangular view, I think
>> the code above should be supported.
>>
>> Cheers
>> Martin
>
>
>
>