Jul 23, 2020 at 3:22pm Jul 23, 2020 at 3:22pm UTC
How to use stl map for Eigen::MatrixXd ? When i try to directly use it as
1 2
std::map<Eigen::MatrixXd,bool > matrix_map;
matrix_map[matrix] = true ;
Its not working. Error is comming like:
1 2
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:834:3: error: static assertion failed: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
EIGEN_CHECK_BINARY_COMPATIBILIY(Func,typename ActualDstTypeCleaned::Scalar,typename Src::Scalar);
I also tried to use unordered map but it is also not working.
Last edited on Jul 24, 2020 at 5:47am Jul 24, 2020 at 5:47am UTC
Jul 23, 2020 at 3:44pm Jul 23, 2020 at 3:44pm UTC
Last edited on Jul 24, 2020 at 5:19pm Jul 24, 2020 at 5:19pm UTC
Jul 27, 2020 at 5:02pm Jul 27, 2020 at 5:02pm UTC
This would seem to be the crucial part of the message:
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
Never having used Eigen, I wouldn't know what that means, but it gives you something specific to search for.