[eigen] [sparse] bool isMuchSmallerThan<OtherScalar>

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



On Thu, 25 Nov 2010 15:50:43 +0100, <bernard.hugueney@xxxxxxxxxx> wrote:
Hi Gael,
Thanks for your answer.

Btw, à propos Eigen::Sparse<bool> :


- template<> struct scalar_fuzzy_impl<bool> seemed to be missing an
isMuchSmallerThan() for some sparse operation but I fail
to be able to reproduce the error (I rewrote the code that was
triggering it :( )

I hit it again. It happens when calling sparseview() from a dense boolean matrix :

#include <Eigen/Sparse>

int main(int argc, char* argv[])
{
    Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic> db(2,2);
    Eigen::SparseMatrix<bool> a(db.sparseView());
    return 0;
}
fails with

In file included from /home/hugueney/Code/HPC/MatrixLibs/Eigen/eigen/Eigen/Core:238:0, from /home/hugueney/Code/HPC/MatrixLibs/Eigen/eigen/Eigen/Sparse:4,
                 from tst-bool.cxx:1:
Eigen/src/Core/MathFunctions.h: In function ‘bool Eigen::internal::isMuchSmallerThan(const Scalar&, const OtherScalar&, typename Eigen::NumTraits<Scalar>::Real) [with Scalar = bool, OtherScalar = bool, typename Eigen::NumTraits<Scalar>::Real = bool]’: /home/hugueney/Code/HPC/MatrixLibs/Eigen/eigen/Eigen/src/Sparse/SparseView.h:95:5: instantiated from ‘void Eigen::SparseView<MatrixType>::InnerIterator::incrementToNonZero() [with MatrixType = Eigen::Matrix<bool, -0x00000000000000001, -0x00000000000000001>]’ Eigen/eigen/Eigen/src/Sparse/SparseView.h:77:5: instantiated from ‘Eigen::SparseView<MatrixType>::InnerIterator::InnerIterator(const Eigen::SparseView<MatrixType>&, Eigen::SparseView<MatrixType>::Index) [with MatrixType = Eigen::Matrix<bool, -0x00000000000000001, -0x00000000000000001>, Eigen::SparseView<MatrixType> = Eigen::SparseView<Eigen::Matrix<bool, -0x00000000000000001, -0x00000000000000001> >, Eigen::SparseView<MatrixType>::Index = int]’ Eigen/eigen/Eigen/src/Sparse/SparseMatrix.h:483:66: instantiated from ‘Eigen::SparseMatrix<_Scalar, _Flags, _Index>& Eigen::SparseMatrix<_Scalar, _Flags, _Index>::operator=(const Eigen::SparseMatrixBase<OtherDerived>&) [with OtherDerived = Eigen::SparseView<Eigen::Matrix<bool, -0x00000000000000001, -0x00000000000000001> >, _Scalar = bool, int _Options = 0, _Index = int, Eigen::SparseMatrix<_Scalar, _Flags, _Index> = Eigen::SparseMatrix<bool>]’ Eigen/eigen/Eigen/src/Sparse/SparseMatrix.h:414:7: instantiated from ‘Eigen::SparseMatrix<_Scalar, _Flags, _Index>::SparseMatrix(const Eigen::SparseMatrixBase<OtherDerived>&) [with OtherDerived = Eigen::SparseView<Eigen::Matrix<bool, -0x00000000000000001, -0x00000000000000001> >, _Scalar = bool, int _Options = 0, _Index = int]’
tst-bool.cxx:6:48:   instantiated from here
Eigen/eigen/Eigen/src/Core/MathFunctions.h:834:92: error: ‘isMuchSmallerThan<OtherScalar>’ is not a member of ‘Eigen::internal::scalar_fuzzy_impl<bool>’

Compilation exited abnormally with code 1 at Thu Nov 25 15:55:44

Best Regards,

Bernard



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