Re: [eigen] Mapping a dynamic vector - howto

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


Hi,

Map<MatrixXd> M(X.data(), n, n);

Marton

On 19.09.2012, at 11:37, Helmut Jarausch wrote:

> Hi,
> 
> in several contexts (e.g. PDE) one has a (long)
> 
> VectorXd X(N)
> 
> where one knows that  N = m*m .  ( m, N unknown at compile time)
> 
> Often one wishes to interpret this vector as an m x m matrix (for reading and writing).
> How can this be achieved with Eigen?
> 
> Many thanks for a hint,
> Helmut.
> 
> 




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