|Re: [eigen] Serious conflict between Dynamic and -1 in Diagonal<>|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Serious conflict between Dynamic and -1 in Diagonal<>
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 10 Jul 2012 23:11:28 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=95ghnH9C+c0Z1R6o4sVwq6qRP4irILM0mxIWr+J2oSo=; b=yUBgKZft11/pIa6V4brdQwn0XVUWr8Gn0dh1kR+BgJ2zcIYnOQEu3e/C5IIGONUqCe FNknLSRfba+y4PS00ab3yqjVW+gkqqquFBl3ctB6oUWXz1tzz3Vx/JMUzRu4GFW5YcMN u2bwZXmuNcgfh/FxNTNH3AEtGJHuX/yRRBEmeaFv8xrKv+5j+hJewiGsOrB9BOIXwUMB zTqindhrjDtCJCenMflujGykpCoj1F6h4HU+cWbHzAxJSXa11beXI6TKTuRSF+jVh+c2 YWhpzCd7WemCawxIW4yXEMiTa2AOR+Td/TA7OfGl+nAXyz1plW/dFz5pL4EHBtkP73BH lGRQ==
For the record, here is the fix:
date: 2012-07-10 23:04:17
summary: Add a DynamicIndex constant for signed quantities and use
it to fix the conflict
between Diagonal<S,-1> (the first sub diagonal) and a runtime
super/sub diagonal which is now:
I'm not sure to backport it because it's quite major, and apparently
the current version works fine at runtime, it only looses track of the
fixed size and fixed index information.
On Tue, Jul 10, 2012 at 3:20 PM, Gael Guennebaud
> it has to be of the same type as integral constants (1, 2, 10, etc.)
> when used as a template parameter. Otherwise, we would had to do
> something like:
> Eigen::Matrix<double, Eigen::Size<3>, Eigen::Size<4> >
> to declare a 3x4 matrix.
> So there is no way we can detect users don't write Diagonal<MatrixXd,
> Dynamic>, but well, according to the (future) documentation, it's like
> someone write:
> Diagonal<MatrixXd, Eigen::Success>
> That's ok wrt the compiler, and we cannot detect such mistake, but it
> just does not make sens.
> On Tue, Jul 10, 2012 at 3:05 PM, Rhys Ulerich <rhys.ulerich@xxxxxxxxx> wrote:
>>> Not sure how you'd
>>> accomplish that cleanly since DynamicSize is signed and DynamicIndex
>>> has to be signed.
>> I take that back if you'd intended to use a tag type and not an enum
>> for DynamicIndex. Curiosity, why was Dynamic made an integer instead
>> of a tag type?
>> - Rhys