Registered Member
|
Hi,
I found something strange. When I declare a variable as follows I get INVALID_MATRIX_TEMPLATE_PARAMETERS error. ---- Eigen::Array<double, DIM, Dynamic, ColMajor, DIM, 5> p; --- It seems that it is due to the following EIGEN_STATIC_ASSERT (when DIM = 1) (In PlainObjectBase.h) EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, (Options&RowMajor)==RowMajor), ... When I set RowMajot instead of ColMajor, it is fine. Also when DIM > 1, it is ok. I do not understand whether this assert statement is really required. |
Moderator
|
You are creating a 1 x N vector, that is a row vector, and so, to prevent ambiguities and to create multiple equivalent types, we request that a row-vector is column major. You can use DIM==1?RowMajor?ColMajor for the option parameter.
|
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]