I have an Eigen::MatrixXd
and I would like to modify all its elements by applying a function component-wise. For example:
MatrixXd m = ...;
for each m[i][j]:
m[i][j] = exp(m[i][j]);
Is there a way to achieve this result?
See Question&Answers more detail:os