Most efficient option for build 3D structures using Eigen matrices

前端 未结 3 1061
别那么骄傲
别那么骄傲 2021-01-13 16:31

I need a 3D matrix/array structure on my code, and right now I\'m relying on Eigen for both my matrices and vectors.

Right now I am creating a 3D structure using

3条回答
  •  猫巷女王i
    2021-01-13 17:09

    A solution I used is to form a fat matrix containing all the matrices you need stacked.

    MatrixXd A(60*60,60);
    

    and then access them with block operations

    A0 = A.block<60,60>(0*60,0);
    ...
    A5 = A.block<60,60>(5*60,0);
    

提交回复
热议问题