问题
How can I store a 3D data using Eigen C++ library? Vector is for 1D data, Matrix is for 2D data but what is for a 3D data? Or is it possible to create a vector of matrix?
回答1:
You could use the Tensor module. It is not yet stable though.
Eigen::Tensor<double, 3> epsilon(4,5,6); // 3 dimensions (4x5x6)
epsilon.setZero();
epsilon(0,1,2) = 1;
epsilon(0,2,1) = -1;
http://eigen.tuxfamily.org/index.php?title=Tensor_support
来源:https://stackoverflow.com/questions/47704691/storing-3d-data-with-eigen-library