Registered Member
|
Hello,
the following program
triggers these error messages: In file included from ../eigen2/Eigen/Sparse:89, from ../eigen2/Eigen/Eigen:2, from main.cpp:2: ../eigen2/Eigen/src/Sparse/AmbiVector.h: In instantiation of »Eigen::AmbiVector<int>«: ../eigen2/Eigen/src/Sparse/SparseProduct.h:176: instantiated from »void Eigen::ei_sparse_product_impl(const Lhs&, const Rhs&, ResultType&) [with Lhs = Eigen::SparseMatrix<int, 0>, Rhs = Eigen::SparseMatrix<int, 0>, ResultType = Eigen::SparseMatrix<int, 0>]« ../eigen2/Eigen/src/Sparse/SparseProduct.h:224: instantiated from »static void Eigen::ei_sparse_product_selector<Lhs, Rhs, ResultType, 0, 0, 0>::run(const Lhs&, const Rhs&, ResultType&) [with Lhs = Eigen::SparseMatrix<int, 0>, Rhs = Eigen::SparseMatrix<int, 0>, ResultType = Eigen::SparseMatrix<int, 0>]« ../eigen2/Eigen/src/Sparse/SparseProduct.h:300: instantiated from »Derived& Eigen::SparseMatrixBase<Derived>::operator=(const Eigen::SparseProduct<Lhs, Rhs, 2>&) [with Lhs = const Eigen::SparseMatrix<int, 0>&, Rhs = const Eigen::SparseMatrix<int, 0>&, Derived = Eigen::SparseMatrix<int, 0>]« ../eigen2/Eigen/src/Sparse/SparseMatrix.h:486: instantiated from »Eigen::SparseMatrix<_Scalar, _Flags>& Eigen::SparseMatrix<_Scalar, _Flags>::operator=(const Eigen::SparseMatrixBase<OtherDerived>&) [with OtherDerived = Eigen::SparseProduct<const Eigen::SparseMatrix<int, 0>&, const Eigen::SparseMatrix<int, 0>&, 2>, _Scalar = int, int _Options = 0]« ../eigen2/Eigen/src/Sparse/SparseMatrix.h:403: instantiated from »Eigen::SparseMatrix<_Scalar, _Flags>::SparseMatrix(const Eigen::SparseMatrixBase<OtherDerived>&) [with OtherDerived = Eigen::SparseProduct<const Eigen::SparseMatrix<int, 0>&, const Eigen::SparseMatrix<int, 0>&, 2>, _Scalar = int, int _Options = 0]« main.cpp:13: instantiated from here ../eigen2/Eigen/src/Sparse/AmbiVector.h:155: Fehler: »void Eigen::AmbiVector<_Scalar>::init(int) [with _Scalar = int]« kann nicht überladen werden ../eigen2/Eigen/src/Sparse/AmbiVector.h:146: Fehler: mit »void Eigen::AmbiVector<_Scalar>::init(typename Eigen::NumTraits<_Real>::Real) [with _Scalar = int]« With float instead of int, everything works fine. Is this a bug in the sparse module? I'm using the current development branch, and g++ 4.4.1. Best regards, Martin |
Moderator
|
hi, problem fixed, thanks for the report.
|
Registered Member
|
Thanks a lot for your quick help!
I just noticed another thing which does not work, namely multiplying a sparse matrix with a sparse vector. It works when I manually cast the SparseVector<T> into a SparseMatrix<T>, but I think that matrix times vector should also work directly. On the other hand, the case sv=sm*sv is missing in the list of supported operations in the tutorial, so perhaps this case is not supported for some reason. Best regards, Martin |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]