title: Mapping array back to an existing Eigen matrix
body: <p>I want to map an array of double to an existing MatrixXd structure.  So far I've managed to map the Eigen matrix to a simple array, but I can't find the way to do it back.</p>
  
  <pre><code>void foo(MatrixXd matrix, int n){
  
   double arrayd = new double[n*n];
   // map the input matrix to an array
   Map&lt;MatrixXd&gt;(arrayd, n, n) = matrix;  
  
    //do something with the array 
               .......
  // map array back to the existing matrix
  
  }
  </code></pre>