Re: [eigen] Access to the raw data of a Matrix / Vector ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Access to the raw data of a Matrix / Vector ?
- From: Rhys Ulerich <rhys.ulerich@xxxxxxxxx>
- Date: Fri, 2 Mar 2012 08:55:03 -0600
- Authentication-results: mr.google.com; spf=pass (google.com: domain of rhys.ulerich@xxxxxxxxx designates 10.68.204.106 as permitted sender) smtp.mail=rhys.ulerich@xxxxxxxxx; dkim=pass header.i=rhys.ulerich@xxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=mpOfvbgLe34P7z7sWkN3l7HmD9FeYK0RQSIJnZBCO04=; b=u0oyneSnoLvAfhRYJ+fiOu5Ja383lMkhQLLjI+eI4xnmHiLShG1dCOhSs0hW1Reonh sz+oUBfygY7b1ueYnkS2UEZ+LS0869QXuZ+OQqyB/Fe8lW9Y1YF+9r5W0aRMUF2RYHTK Kpj++q+M77Bb/CXdhCo0wNPN0skaKu2MlEv6eRWk56DR5fU3kI4sF/c3cJAJRsU0hDpl v7hpOKEcdAfqgtjkTu6xjOz2QPc5AZG9csQ549IR39ufia8yJrDx8l+8TENO424/DKtH ub3K4sPu1BZn647XaoTbtLLpH5BIyZ+J96Dki0AH/CoOuEGZPaPl4FXH0Ba8oj/JJbgQ KDeQ==
> I want to read (binary) into a big matrix. For that I need a pointer to the
> beginning of the raw data managed by the matrix.
>
> Something like
>
> MatrixXd A(m,n);
>
> FILE.read( (char*) A.raw(), m*n*sizeof(double));
A.data() per http://eigen.tuxfamily.org/dox/QuickRefPage.html ?
- Rhys