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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…