Q:

Storing 3D data with Eigen library

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?

A:

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

