[eigen] matrix function / exponential warnings |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] matrix function / exponential warnings
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Sun, 20 Jun 2010 12:16:38 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=khS2YrQOhIENtMyVWuaNrJi5p2ijKUpYyjW9cDSxzqk=; b=sAF4Yz7vwjED/FPHzxi7ifo5KLjf8EkrRF7MqnF6ksCvQdMYfrXZeqeKkso0kQakg/ 5M7hWBycAbcQT8dOUxf0gPrhFQowNAJRD67FiT54GCa9cvpLTKQ0qnI+kDhq9jvbrjLo rvN4cDNHSXms/5lAFAaouua6xZqPX+fn3GrCU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=U2tSlYrvLzP0HljTqmkIS+UNV3w63+E8niLhBV9U28sWZREPHQxnsDso4SPxv3Gcwd 4HgpYselv9IpHN5RDyBgZclgghUQ3tFIjwMpGtrRl0yVoQ7kIthLRSRXH4OhjSGjkHST 9nPaFav6MqVbeNbeJMF2jniDsjA9tj3pexbWQ=
Hi,
we have a few tiny warnings left in the matrix module. They are
related to the following two functions:
MatrixFunction.h
template <typename ResultType>
inline void evalTo(ResultType& result) const
{
const typename ei_eval<Derived>::type Aevaluated = m_A.eval();
MatrixFunction<typename Derived::PlainObject> mf(Aevaluated, m_f);
mf.compute(result);
}
and to
MatrixExponential.h
template <typename ResultType>
inline void evalTo(ResultType& result) const
{
const typename ei_eval<Derived>::type srcEvaluated = m_src.eval();
MatrixExponential<typename Derived::PlainObject> me(srcEvaluated);
me.compute(result);
}
The issue is that the classes MatrixFunction and MatrixExponential are storing
const MatrixType& m_M;
and it seems to be expected that the MatrixType is always a
PlainObject. I am not sure whether that is really necessary. We
already have a solution to this in Eigen which means storing objects
as ei_nested<...>::type.
Even when we leave the code as is, I think we need to change at least
const typename ei_eval<Derived>::type srcEvaluated = m_src.eval();
to
const typename Derived::PlainObject srcEvaluated = m_src.eval();
because ei_eval<...>::type is not necessarily equal to
Derived::PlainObject and here, you really want to pass a reference to
Derived::PlainObject.
Any comments? Is there a particular reason why ei_nested<...>::type
should not be working out of the box?
Regards,
Hauke