Problems using eigens Tensor class

℡╲_俬逩灬. 提交于 2019-12-23 04:09:28

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!