Re: [eigen] Mapping dynamic size vectors |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Mapping dynamic size vectors
- From: Matthieu Brucher <matthieu.brucher@xxxxxxxxx>
- Date: Wed, 15 Jul 2015 15:45:37 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=Id6g3h359x8pwPFTqfnIJYcs6mDe+kNvv2jjVE++mWY=; b=TxXmW8N+jNeZGQagG0EnEoqm2/NIEsTVbOkCQ6/vrkmOUq/5PnXrM9nS9vtl/YcwjO m9TEsWjOjtrYlIAwqcM3SyD6JeQ0L+ObdBW4kvxlaH3ZWoigF+84kGnABY4uVQ6pwG7m eLFeY3iPV2ej7weM/YPmjFk9N0aIa291K0JQh2AfShhHl/OxTlgS6/eqOIl7p4JV939K LRgiLdjPJLbrHfzU2+FJXG8PAHnZRBFRvV2JUj9MzzAQKG4lyztLboIYySi+Dl0nTdB4 EVDJIJa7WDu6DJynFhaU15E/rh5izEZPHnoNQGyvK1MPvQEs0EHC3BA3usJ53l4X6Umy 77Rw==
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/