Most efficient way to loop through an Eigen matrix

后端 未结 4 1217
栀梦
栀梦 2021-02-02 01:37

I\'m creating some functions to do things like the \"separated sum\" of negative and positive number, kahan, pairwise and other stuff where it doesn\'t matter the order I take t

4条回答
  •  不知归路
    2021-02-02 01:43

    Try to store xs(i,j) inside a temporary variable inside the loop so you only call the function once.

提交回复
热议问题