Registered Member
|
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. |
Moderator
|
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.
|
Registered Member
|
Got it. Thanks |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]