Registered Member
|
Hi all,
First time Eigen user here. I am trying to setup a simple sparse solver like this: Eigen::SparseMat<float> A; // fill A by A.insert() Eigen::VectorXd vB(A.rows()); // fill B vector Eigen::SparseLU<Eigen::SparseMat<float>,Eigen::COLAMDOrdering<int> > solver; solver.compute(A); solver.solve(B); The above compiles fine, but with below generates 2 compile errors: Eigen::VectorXd X=solver.solve(B); Something with the return type seems wrong but I can't decipher what's the correct way to do this. Please help. Thanks! Using the latest dev branch code on windows 7 with eclipse/mingw. ----------------------------------------------------- no matching function for call to ' Eigen::Map<Eigen::Matrix<float, -1, -1>, 0, Eigen::OuterStride<> >::Map(Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1>, 1>::Scalar*, Eigen::internal::MappedSuperNodalMatrix<float, int>::Index&, Eigen::internal::MappedSuperNodalMatrix<float, int>::Index&, Eigen::OuterStride<>)' line 271, external location: \Eigen\src\SparseLU\SparseLU_SupernodalMatrix.h C/C++ Problem Description Resource Path Location Type no matching function for call to ' Eigen::Map<Eigen::Matrix<float, -1, -1>, 0, Eigen::OuterStride<> >::Map(Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1>, 1>::Scalar*, Eigen::SparseLUMatrixUReturnType<Eigen::internal::MappedSuperNodalMatrix<float, int>, Eigen::MappedSparseMatrix<float, 0, int> >::Index&, Eigen::SparseLUMatrixUReturnType<Eigen::internal::MappedSuperNodalMatrix<float, int>, Eigen::MappedSparseMatrix<float, 0, int> >::Index&, Eigen::OuterStride<>)' line 709, external location: \Eigen\src\SparseLU\SparseLU.h C/C++ Problem ----------------------------------------------------- |
Registered Member
|
Ah ... fixed ... just change all the VectorXd to VectorXf to match the matrix type ... stupid me.
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]