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: Sameer Agarwal <sameeragarwal@xxxxxxxxxx>
- Date: Fri, 25 Jun 2010 07:14:30 -0700
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1277475274; bh=cbGN4wsPjqUewVowW2QpYgZjYD0=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Content-Type:Content-Transfer-Encoding; b=FzgLAIVqBkEhgCD4+5yxxZ/Nj4jj9QYEPJ2g2nIq23Duh+238S8v/lmwjOXplKPIb Sk5OcK61TqhQR6aagzC2A==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: content-type:content-transfer-encoding:x-system-of-record; b=va5pyVjTU5FhM497vPd5HWK+TINscj80D9ENdvXZX3iG465oZeCBpGcNJLJrWZK3t jJAe7Bk3oCbkaVZUoTTMA==
Thank you.
Sameer
On Fri, Jun 25, 2010 at 1:25 AM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> 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
>>
>>
>>
>
>
>