Problems using eigens Tensor class

671 views Asked by At

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?

2

There are 2 answers

2
user2658323 On BEST ANSWER

The unsupported Tensor module is only found in the unstable version for now (Current stable: 3.2.5).

1
Tim B On

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.