This forum has been archived. All content is frozen. Please use KDE Discuss instead.

What is wrong with this error?

Tags: None
(comma "," separated)
flyfan
Registered Member
Posts
15
Karma
0

What is wrong with this error?

Fri Apr 14, 2017 2:12 pm
I want to use Eigen::SPQR to calculate linear equation with sparse martix, but I get the following error:
C:\Qt\Eigen3.3.3\Eigen\src\Core\Solve.h:127: error: no matching function for call to 'Eigen::SPQR<Eigen::SparseMatrix<std::complex<double> > >::_solve_impl(const Eigen::SparseVector<std::complex<double>, 0, int>&, Eigen::internal::evaluator<Eigen::Solve<Eigen::SPQR<Eigen::SparseMatrix<std::complex<double> > >, Eigen::SparseVector<std::complex<double>, 0, int> > >::PlainObject&) const'
solve.dec()._solve_impl(solve.rhs(), m_result);

How to deal with it? Thanks.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: What is wrong with this error?

Tue Apr 25, 2017 11:38 am
It seems you are passing a sparse vector as the right hand side but SPQR can only deal with dense one. So copy it to a VectorXd first.
flyfan
Registered Member
Posts
15
Karma
0

Re: What is wrong with this error?

Tue Apr 25, 2017 12:07 pm
ggael wrote:It seems you are passing a sparse vector as the right hand side but SPQR can only deal with dense one. So copy it to a VectorXd first.

Got it. Thanks


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]