This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <unsupported/Eigen/CXX11/Tensor> | |
| // Inspired by my question and its accepted answer on StackOverflow (https://stackoverflow.com/questions/47556726), I've decided to create this in a little gist. | |
| // This Gist is about some undocumented (https://bitbucket.org/eigen/eigen/src/default/unsupported/Eigen/CXX11/src/Tensor/README.md?fileviewer=file-view-default) behavior of Eigen::Tensor contractions. | |
| /** Print the contents of a rank-four tensor in a fashionable way | |
| */ | |
| void print(const Eigen::Tensor<double, 4>& T) { |