![]() Registered Member ![]()
|
When introducing a custom scalar type "number" via extension of the typetraits
namespace Eigen { template<> struct NumTraits<number> { enum { IsComplex = 0, IsInteger = 0, ReadCost = 1, AddCost = 1, MulCost = 1, IsSigned = 1, RequireInitialization = 1 // not sure - this indicates that the constructor has to be called }; typedef number Real; typedef number NonInteger; typedef number Nested; static inline Real epsilon() { return Real(0); } static inline Real dummy_precision() { // make sure to override this for floating-point types return Real(0); } //static inline number highest() { return number::maxVal(); } //static inline number lowest() { return number::minVal(); } }; } it turns out, that the triangularView does not work properly. During compilation I get: error: expected expression Matrix5x3 u = lu.matrixLU().triangularView<Eigen::Upper>(); ^ Note: This is part of the example for full pivor LU decomposition. The only thing changed is the scalar type, which is set to the custom type. Did I forget something in the customization of the scalar types, which causes this error? Best regards, Stefan |
![]() Moderator ![]()
|
please, paste the complete error message.
|
![]() Registered Member ![]()
|
This is the complete error message, I do not get more:
[...]/Polytopes/HPolytope/HPolytope.tpp:136:66: error: expected expression Matrix5x3 u = lu.matrixLU().triangularView<Eigen::Upper>(); .....................................................................................................^ 1 error generated. make[3]: *** [examples/CMakeFiles/example_vertexEnumeration.dir/example_vertexEnumeration.cpp.o] Error 1 When replacing my custom type with a double, the error does not occur. Thought I missed something in the Typetraits Definition. |
![]() Moderator ![]()
|
hm, you might have a non ascii character hidden somewhere in the source code.
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]