问题
I would like to use eigens Tensor class from the unsupported module. This site suggests to include something like #include <Eigen/CXX11/Tensor>
to be able to use it. I installed eigen via Homebrew (Version 3.2.4) on my Mac on OS X Yosemite. Although I get eigen to work properly, I cannot find the necessary module in the unsupported folder:
#include <eigen3/unsupported/Eigen/???>
What might I have forgotten or done wrong? Or do I have an outdated version which does not have yet the Tensor class?
回答1:
The unsupported Tensor module is only found in the unstable version for now (Current stable: 3.2.5).
回答2:
It looks like you might want to use the KroneckerProduct module which is:
#include <Eigen/KroneckerProduct>
Eigen::MatrixXd X = Eigen::kroneckerProduct(A, B);
// A and B are Eigen matrices.
来源:https://stackoverflow.com/questions/31029466/problems-using-eigens-tensor-class