Re: [eigen] Question about ColMajor vs. RowMajor |

[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]

*To*: eigen@xxxxxxxxxxxxxxxxxxx
*Subject*: Re: [eigen] Question about ColMajor vs. RowMajor
*From*: Rhys Ulerich <rhys.ulerich@xxxxxxxxx>
*Date*: Fri, 16 Dec 2011 21:38:53 -0600
*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=NwFYNRcVn/FXbnadYMYCpfSham+X7U7gylTK1dc0s+w=; b=wxHshK2BOxoN5aapl4RpvnEtVzB2lGGUXJnrdR6OC8vLyl6AaRat/nlDV/SYhrGWDi +W7nXgLtDwbdAJOoqcJDtRFwnaW10lhEcLqXrv8PltPNE+hZ8qDRRMZLAJphRSW+CN0R wvxiFnPcl2vFf6GZ0kANjFDxRrjLXFDvH15yk=

> I assume you compiled with -DNDEBUG or something similar?
> IIRC operator() with single argument should only be used for
> single-dimensional matrices (i.e. vectors).
>
> Actually (question to Gael/Benoit): Shouldn't there be a compile-time
> check/static assertion for operator(), making it work only on matrices which
> are known at compile-time to have (at least) one dimension fixed to 1?
>
> Or is operator()(int) supposed to mime the MATLAB behavior of mat(i) now
> (i.e. viewing the matrix data as a vector)?
The docs mention that operator()(Index) is available when
LinearAccessBit is set
(http://eigen.tuxfamily.org/dox/group__flags.html).
- Rhys