Eigen Increment Column by One
<p>How to increment a column of a dynamic matrix by one, as an in place operation (without creating copies/intermediates) ?</p>

<p>Attempt:</p>

<pre><code>#include &lt;Eigen/Dense&gt;
#include &lt;iostream&gt;
#include &lt;stdint.h&gt;
int main(void){
    Eigen::MatrixXf A;
    A = Eigen::MatrixXf::Random(3, 5);
    std::cout &lt;&lt; A &lt;&lt; std::endl &lt;&lt; std::endl;
    A.col(1) = A.col(1)*2; //this works.
    A.col(1) = A.col(1) + 1; //this doesn't work.
    std::cout &lt;&lt; A &lt;&lt; std::endl;
}
</code></pre>