| Re: [eigen] [sparse] bool isMuchSmallerThan<OtherScalar> | 
[ Thread Index | 
Date Index
| More lists.tuxfamily.org/eigen Archives
] 
- To: eigen@xxxxxxxxxxxxxxxxxxx
 
- Subject: Re: [eigen] [sparse] bool isMuchSmallerThan<OtherScalar>
 
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
 
- Date: Thu, 25 Nov 2010 17:58:18 +0100
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=gamma;        h=domainkey-signature:received:mime-version:received:in-reply-to         :references:from:date:message-id:subject:to:content-type         :content-transfer-encoding;        bh=Xt1cZIJ3SGLBvoO+2O5ZaSybj0jPH2Y7/5gQPkTrFtQ=;        b=GLqR5F3qoXms8r828RKZkc2jPL7jUjE5upAvRlo+jehNVeczF+TBvmG0p8PBd1ZiOe         56Bg85lS/wDXaCwPg+h/Z486MKB9j90LHUd2did/vA7oOUsxpkER0/p8ZCbQ8hhQ0EkA         RcsBOhZyvc7wWC1tXrQpd5u9aGJWDfVuaGWug=
 
- Domainkey-signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=gamma;        h=mime-version:in-reply-to:references:from:date:message-id:subject:to         :content-type:content-transfer-encoding;        b=RiGpavG+8XLfOY/8JiBYiQtt3Ey/HKg8OJFoKIiQv2gr06Cg7Sg6cV21cMicZfq3cA         838uJYOiQ2HCz3C8wVABl4mvUymZQt7NfR0a7KpnWEK/yj49OaQY8ykZ4gISYAZdNPNw         LZa80fN8MZK7wBaGCRxQM0FqfioA5QuBYPj7E=
 
that one is fixed :)
gael
On Thu, Nov 25, 2010 at 3:59 PM,  <bernard.hugueney@xxxxxxxxxx> wrote:
>
> 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
>
>
>