title: Static reshape of Eigen matrix
body: <p>I am experimenting with doing bicubic interpolation of some gridded data using Eigen, and I can't figure out how to reshape the 16x1 column vector of coefficients into a 4x4 matrix.  Ideally I would like to do something along the lines of <a href="https://bitbucket.org/eigen/eigen/pull-request/41/reshape/diff" rel="nofollow">https://bitbucket.org/eigen/eigen/pull-request/41/reshape/diff</a> without any copying, but I can't make heads or tails of the docs.  Alternatively, a map would be fine as well, but I can't figure out how to use a map on an already existing matrix.</p>
  
  <p>More here: <a href="http://en.wikipedia.org/wiki/Bicubic_interpolation" rel="nofollow">http://en.wikipedia.org/wiki/Bicubic_interpolation</a></p>
  
  <pre><code>/// The inverse of the A matrix for the bicubic interpolation 
  /// (http://en.wikipedia.org/wiki/Bicubic_interpolation)
  static const double Ainv_data[16*16] = {
       1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
       0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      -3,  3,  0,  0, -2, -1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
       2, -2,  0,  0,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
       0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,
       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,
       0,  0,  0,  0,  0,  0,  0,  0, -3,  3,  0,  0, -2, -1,  0,  0,
       0,  0,  0,  0,  0,  0,  0,  0,  2, -2,  0,  0,  1,  1,  0,  0,
      -3,  0,  3,  0,  0,  0,  0,  0, -2,  0, -1,  0,  0,  0,  0,  0,
       0,  0,  0,  0, -3,  0,  3,  0,  0,  0,  0,  0, -2,  0, -1,  0,
       9, -9, -9,  9,  6,  3, -6, -3,  6, -6,  3, -3,  4,  2,  2,  1,
      -6,  6,  6, -6, -3, -3,  3,  3, -4,  4, -2,  2, -2, -2, -1, -1,
       2,  0, -2,  0,  0,  0,  0,  0,  1,  0,  1,  0,  0,  0,  0,  0,
       0,  0,  0,  0,  2,  0, -2,  0,  0,  0,  0,  0,  1,  0,  1,  0,
      -6,  6,  6, -6, -4, -2,  4,  2, -3,  3, -3,  3, -2, -1, -2, -1,
       4, -4, -4,  4,  2,  2, -2, -2,  2, -2,  2, -2,  1,  1,  1,  1};
  
  Eigen::Matrix&lt;double, 16, 16&gt; Ainv(Ainv_data);
  
  Eigen::Matrix&lt;double, 16, 1&gt; f;
  f.setRandom();
  Eigen::Matrix&lt;double, 16, 1&gt; alpha = Ainv*f;
  // This next line works, but it is making a copy, right?
  Eigen::Matrix&lt;double, 4, 4&gt; a(alpha.data());
  </code></pre>