[eigen] Mapping dynamic size vectors

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


I would like to use a map between a vector type (Matrix<double, Dynamic, 1>) and a pointer (double *).

I try to do it like this:
    Map< Matrix<double, Dynamic, 1> > my_vector(&my_array[index]);
where my_array is of type 'double *', and 'index' is the index where the data I want to map starts.

It guess it should not work because I don't provide any information on the size of the array.
However, I get another error message which I don't understand:

==================== ERROR MESSAGE ====================
eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: erreur: static assertion failed: YOU_CALLED_A_FIXED_SIZE_METHOD_ON_A_DYNAMIC_SIZE_MATRIX_OR_VECTOR
     #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
eigen3/Eigen/src/Core/util/StaticAssert.h:134:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT’
   EIGEN_STATIC_ASSERT(TYPE::SizeAtCompileTime!=Eigen::Dynamic, \
eigen3/Eigen/src/Core/MapBase.h:128:7: note: in expansion of macro ‘EIGEN_STATIC_ASSERT_FIXED_SIZE’
==================== ERROR MESSAGE ====================

What does this mean?



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/