Re: [eigen] More sparse operator issues |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] More sparse operator issues
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 25 Jun 2010 10:25:56 +0200
- 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=9PbwyT6EnYN53+RmSxPmMUKo15u6tbPmdsF79nUNHKg=; b=h3R0IpLtN+Fp+d7x5zjYtDddAQKMJWn0lA3xiKrjjuXkhJov2iDDxXDSVrkDygs2fQ VJvrs6b7UMlD+j9+n6BvS+BC+34TPPWkhZzU8OKmhV1nUYstj4D1eIZJBrfXYocuXBMe pBoa2WP5pfXup2f0z4SNwzxHrzHCWaH3ByQhQ=
- 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=UG2w6yCZecj/RERFM98h6izyt8np/rrVyj10ywXFo9VJ42keqWEpVXBHo80/hb4ub8 BNyoRFE0k1K+CbliBg9iAkkyxCXTpJGtFSyMzxw3BXHW4yteyNG/SkSOEHf5+xjTkFm/ MFSK459/N+nizYGJIqRFawqTRyrW0hNPfaQxg=
fixed.
gael
On Fri, Jun 25, 2010 at 12:39 AM, Sameer Agarwal
<sameeragarwal@xxxxxxxxxx> wrote:
> Hi Guys,
>
> The following code
>
> #include "../eigen/Eigen/Core"
> #include "../eigen/Eigen/Sparse"
>
> int main() {
> Eigen::SparseMatrix<double, Eigen::ColMajor> m(5,5);
> Eigen::SparseVector<double> x(5,1);
> Eigen::SparseVector<double> y = (m*x)/2;
> }
>
> fails with
>
> ../eigen/Eigen/src/Sparse/SparseTranspose.h: In constructor
> ‘Eigen::TransposeImpl<MatrixType,
> Eigen::Sparse>::InnerIterator::InnerIterator(const
> Eigen::TransposeImpl<MatrixType, Eigen::Sparse>&, typename
> Eigen::ei_traits<Eigen::Transpose<Derived> >::Index) [with MatrixType
> = Eigen::CwiseUnaryOp<Eigen::ei_scalar_quotient1_op<double>,
> Eigen::SparseProduct<const Eigen::SparseMatrix<double, 0, int>&, const
> Eigen::SparseVector<double, 0, int>&> >]’:
> ../eigen/Eigen/src/Sparse/SparseMatrixBase.h:238: instantiated from
> ‘Derived& Eigen::SparseMatrixBase<Derived>::operator=(const
> Eigen::SparseMatrixBase<OtherDerived>&) [with OtherDerived =
> Eigen::Transpose<Eigen::CwiseUnaryOp<Eigen::ei_scalar_quotient1_op<double>,
> Eigen::SparseProduct<const Eigen::SparseMatrix<double, 0, int>&, const
> Eigen::SparseVector<double, 0, int>&> > >, Derived =
> Eigen::SparseVector<double, 0, int>]’
> ../eigen/Eigen/src/Sparse/SparseVector.h:243: instantiated from
> ‘Eigen::SparseVector<_Scalar, _Flags, _Index>&
> Eigen::SparseVector<_Scalar, _Flags, _Index>::operator=(const
> Eigen::SparseMatrixBase<OtherDerived>&) [with OtherDerived =
> Eigen::CwiseUnaryOp<Eigen::ei_scalar_quotient1_op<double>,
> Eigen::SparseProduct<const Eigen::SparseMatrix<double, 0, int>&, const
> Eigen::SparseVector<double, 0, int>&> >, _Scalar = double, int
> _Options = 0, _Index = int]’
> ../eigen/Eigen/src/Sparse/SparseVector.h:210: instantiated from
> ‘Eigen::SparseVector<_Scalar, _Flags, _Index>::SparseVector(const
> Eigen::SparseMatrixBase<OtherDerived>&) [with OtherDerived =
> Eigen::CwiseUnaryOp<Eigen::ei_scalar_quotient1_op<double>,
> Eigen::SparseProduct<const Eigen::SparseMatrix<double, 0, int>&, const
> Eigen::SparseVector<double, 0, int>&> >, _Scalar = double, int
> _Options = 0, _Index = int]’
> test_sparse.cc:7: instantiated from here
> ../eigen/Eigen/src/Sparse/SparseTranspose.h:60: error: no matching
> function for call to
> ‘Eigen::CwiseUnaryOpImpl<Eigen::ei_scalar_quotient1_op<double>,
> Eigen::SparseProduct<const Eigen::SparseMatrix<double, 0, int>&, const
> Eigen::SparseVector<double, 0, int>&>,
> Eigen::Sparse>::InnerIterator::InnerIterator(const
> Eigen::SparseMatrix<double, 6, int>&, int&)’
> ../eigen/Eigen/src/Sparse/SparseCwiseUnaryOp.h:63: note: candidates
> are: Eigen::CwiseUnaryOpImpl<UnaryOp, MatrixType,
> Eigen::Sparse>::InnerIterator::InnerIterator(const
> Eigen::CwiseUnaryOpImpl<UnaryOp, MatrixType, Eigen::Sparse>&, typename
> MatrixType::Index) [with UnaryOp =
> Eigen::ei_scalar_quotient1_op<double>, MatrixType =
> Eigen::SparseProduct<const Eigen::SparseMatrix<double, 0, int>&, const
> Eigen::SparseVector<double, 0, int>&>]
> ../eigen/Eigen/src/Sparse/SparseCwiseUnaryOp.h:56: note:
> Eigen::CwiseUnaryOpImpl<Eigen::ei_scalar_quotient1_op<double>,
> Eigen::SparseProduct<const Eigen::SparseMatrix<double, 0, int>&, const
> Eigen::SparseVector<double, 0, int>&>,
> Eigen::Sparse>::InnerIterator::InnerIterator(const
> Eigen::CwiseUnaryOpImpl<Eigen::ei_scalar_quotient1_op<double>,
> Eigen::SparseProduct<const Eigen::SparseMatrix<double, 0, int>&, const
> Eigen::SparseVector<double, 0, int>&>, Eigen::Sparse>::InnerIterator&
>
> whereas the following works
>
> #include "../eigen/Eigen/Core"
> #include "../eigen/Eigen/Sparse"
>
> int main() {
> Eigen::SparseMatrix<double, Eigen::ColMajor> m(5,5);
> Eigen::SparseVector<double> x(5,1);
> Eigen::SparseVector<double> y = m*(x/2);
> }
>
> Thanks,
> Sameer
>
>
>