Created
May 15, 2018 07:45
-
-
Save afabri/75e8811a5bbe57797e745833295d2588 to your computer and use it in GitHub Desktop.
Eigen coefficients and VC2013
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 <Eigen/Sparse> | |
int main() | |
{ | |
Eigen::Matrix3d m3d; | |
int i_int = 0, j_int = 0; | |
std::size_t i_size_t = 0, j_size_t = 0; | |
std::ptrdiff_t i_ptrdiff_t = 0, j_ptrdiff_t = 0; | |
double d; | |
d = m3d(0, 0); // ok | |
d = m3d(i_int, j_int); // ok | |
d = m3d(i_ptrdiff_t, j_ptrdiff_t); // ok | |
d = m3d.coeff(i_int, j_size_t); // works, but slower | |
// d = m3d(i_int, j_size_t); // fails | |
// d = m3d(i_size_t, j_size_t); // fails | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like an issue we should report to Eigen.