[eigen] problem computing kernel in eigen

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


 Hello,

I have a problem with a simple call to the kernel (function call fullPivLu().kernel() ) of an Eigen::Matrix<NT,Eigen::Dynamic,Eigen::Dynamic> . This works for many different instantiations of NT, like mpq_class. The problem is when I try to use a rational number type from the CGAL library, CGAL::Gmpq. I get the following error from the compiler:

/usr/include/eigen3/Eigen/src/LU/FullPivLU.h:595:7: error: call of overloaded ‘abs(const Scalar&)’ is ambiguous

The  error is fixed by replacing

 if(abs(dec().matrixLU().coeff(i,i)) > premultiplied_threshold)

with

 if(internal::abs(dec().matrixLU().coeff(i,i)) > premultiplied_threshold)

in line 595 of /usr/include/eigen3/Eigen/src/LU/FullPivLU.h

Do you think this is a bug?

Best,
Vissarion Fisikopoulos.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/