Re: [eigen] Mapping a dynamic vector - howto |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Mapping a dynamic vector - howto
- From: Márton Danóczy <marton78@xxxxxxxxx>
- Date: Wed, 19 Sep 2012 11:56:34 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=GkE/qFSclQHmZwE84+Agrf4kzjcUYytk6SD7LMLbOOQ=; b=NPOhXXEq847pXDtDvLYO6mv/90DVn/R3SdY4Ucrx7aHj0UGeN+lUt53lPfii3R/KBz /JxIwbhl+P7AyqXL1io0jCEsOHyH23zSoZqX6fvre3/6U/GO8U39HJkqGlNdX7WemE8z YgBPnOmnzvoJ52te16lfkFXEsku+jz6ff/1Qhg1F5V0PUeMzePmo9rYiNU2fgQj2ab4x A+lcaTvdSJl86H/uHD+j4G2uRYOeXioMCuNngqMrly/eB9d9avFW/A0AxA1VxHKES78Z zAGT2+SUUSxc+XdHxzbfK7rmMXOk5SBm+umtRg3GEtwllKzWQiT5Lzfjan7f6RJz7330 Q9kQ==
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.
>
>