Re: [eigen] RotationBase times DiagonalMatrix |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] RotationBase times DiagonalMatrix
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Sat, 24 Sep 2011 13:38:11 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=lSW6/sFGERj8zHjr5GkqCMNp+e+vv7xbRMQJYXkS57g=; b=Z95QZF/ki12OYinckCAjv+t6hloM3SgD/RluxxUe0XK7EhMV48d6tqD7TCi/PVke8D q6mtAXmk/TLwFv7x4cCLUNXXOT+dlrBLRreJ9oG69vAemZaerzGv4K/C/hqrhH2i/udR qrsAZnk4HOUbymbgXqkS0X+fGR9AFNxMSFf+0=
Hi,
first I want to say that I almost completely +1 Christoph's post.
On Fri, Sep 23, 2011 at 7:31 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> The real
> question is do we want that Translation to Transform conversion
> happens being the scene. At a first glance I would say no, and that
> why I put these explicit keywords. I remember that was suggested by
> another user, so I'm not the only one who thought like that.
For me the question is why we would want to prohibit this implicit
conversion as long as the *is a* relation is not compromised.
Following Christoph's reasoning, a Translation is a Transform and
IMHO that is what should matter.
OTOH, one might argue that with such an implicit conversion the memory
requirements increase from Dim to 2*(Dim+1) for translations as well
as scaling types.
But then I am not sure whether that should be a reason to prohibit
such a conversion.
> Moreover, I
> see that the conversion ctor from Transform to Transform of different
> kinds (e.g., Affine to Projective) is not explicit.
IIRC, we check the validity of these conversions at compile time. If
we don't do it yet, it is a trivial static assert. In the end will not
break the *is a* relation.
> I'd still keep it for the ctor from EigenBase.
Absolutely, the perfect example where you really want the explicit keyword.
> We could add a non explicit one from DiagonalMatrix then.
And here is the only point where I am not sure. In my eyes the only
reason is the increased memory requirement but that's the same as for
Translations. Following the *is a* reasoning of Christoph, the
conversion is fine as long the Transform is not an Isometry and I
think we could prevent this conversion once again with a
static_assert.
- Hauke