[eigen] Matrix::RowXpr::Nested is a reference...
[
Thread Index
|
Date Index
|
More lists.tuxfamily.org/eigen Archives
]
To
: Eigen <
eigen@xxxxxxxxxxxxxxxxxxx
>
Subject
: [eigen] Matrix::RowXpr::Nested is a reference...
From
: Hauke Heibel <
hauke.heibel@xxxxxxxxxxxxxx
>
Date
: Thu, 1 Oct 2009 16:08:05 +0200
Dkim-signature
: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=rCnDAjcc3TyGeIuEaGOoNwd7Rh6Q5k8O1FeryDhiXYY=; b=DMnntpzT7sUZJRk9jX6kyse3CHXLSix3gCaofGBucczN657CiDOEfPpmDsLt11ogRy mZ3zZP3JtvOyBNvi+8Mv05IJNJKhkm3qwII9qDBP0AZC+fem/wSaCXR0MYgZdEJ4z1Y0 ieriQ7tiDuRMe9yw1TPLuSfbSl2zxEZ4hyT+w=
Domainkey-signature
: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ZxTev7Xems66ADHuVoFlGyuF/DXkMwl2+LeU9lcUA7ApE58FOoHGkKfa58GtvIpgl9 i7zFR5vmHSs3X/lZwov/cXLUptRuf0lfs4yih1uluk35uAGTjvnPy1uuY/B+7+ABbgBY ZRMlbq4qUBdyjIVzHaZF7DLztfRvaqZiNR0wI=
Is that correct as is?
In the following case
Replicated<MatrixXd::RowXpr,2,1>(matrix.row(0))
it means that it fails since matrix.row(0) returns a temporary to which a reference is stored in Replicate.
I used this piece of code to verify my assumption:
#include "Eigen/Core"
#include "boost/type_traits/is_reference.hpp"
void main()
{
typedef Eigen::MatrixXd::RowXpr::Nested type;
std::cout << typeid(type).name();
if (boost::is_reference<type>::type::value == true) std::cout << "&";
std::cout << std::endl;
}
Cheers,
Hauke
Follow-Ups
:
Re: [eigen] Matrix::RowXpr::Nested is a reference...
From:
Benoit Jacob
Messages sorted by:
[
date
|
thread
]
Prev by Date:
[eigen] return type of inner product
Next by Date:
Re: [eigen] Matrix::RowXpr::Nested is a reference...
Previous by thread:
Re: [eigen] return type of inner product
Next by thread:
Re: [eigen] Matrix::RowXpr::Nested is a reference...
Mail converted by
MHonArc
2.6.19+
http://listengine.tuxfamily.org/