Re: [eigen] Mapping dynamic size vectors

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


Hi,

I think that's because the default size is then 0, which is supposed
to be for static sizes!

Matthieu

2015-07-15 15:36 GMT+01:00 Cedric Doucet <cedric.doucet@xxxxxxxx>:
>
> Hello!
>
> 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’
>        EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)
>        ^
> ==================== ERROR MESSAGE ====================
>
> What does this mean?
>
> Cheers,
>
> Cédric
>
>
>
>



-- 
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher
Music band: http://liliejay.com/



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