title: Apply function to all Eigen matrix element
body: <p>I have an <code>Eigen::MatrixXd</code> and I would like to modify all its elements by applying a function component-wise. For example:</p>
  
  <pre><code>MatrixXd m = ...;
  
  for each m[i][j]:
    m[i][j] = exp(m[i][j]);
  </code></pre>
  
  <p>Is there a way to achieve this result?</p>