|
Ublas : |
From: Paolo Giarrusso (p.giarrusso_at_[hidden])
Date: 2007-12-10 19:11:27
I have a program like this:
#include <boost/numeric/ublas/vector_proxy.hpp> // <== (1)
#include <boost/numeric/ublas/lu.hpp>
...
lu_factorize(...)
If I comment out line (1), the call to the lu_factorize template function
fails to compile with the attached errors messages, so in short that
inclusion should be added to lu.hpp.
I also verified in detail the error message before deducing I was missing that
header, so I'm confident, beyond any unreasonable doubt, that is the correct
solution, and that I've hit no C++ pitfall or compiler bug or whatever (I'm
using G++ 4.1, BTW); that's the reason of the excess paranoia with which I've
double-checked everything.
The messages in short are complaining about the lack of functions like:
project(ublas::matrix_column<ublas::matrix<double> >&, ublas::range)
which are declared indeed in <vector_proxy.hpp>. Also, I verified in the
preprocessed source that no two-argument free function overloading project()
exists. So, I definitely think <ublas/lu.hpp> is missing an include (beyond
that, it is also missing some documentation).
Bye, and thanks for your work.
-- "Doh!" (cit.), I've made another mistake! Paolo Giarrusso, aka Blaisorblade
g++ -g -O2 metodi_iterativi_blas.cpp -o metodi_iterativi_blas
/usr/include/boost/numeric/ublas/lu.hpp: In function âtypename M::size_type boost::numeric::ublas::lu_factorize(M&, PM&) [with M = mat_t, PM = boost::numeric::ublas::permutation_matrix<long unsigned int, boost::numeric::ublas::unbounded_array<long unsigned int, std::allocator<long unsigned int> > >]â:
metodi_iterativi_blas.cpp:166: instantiated from here
/usr/include/boost/numeric/ublas/lu.hpp:137: error: no matching function for call to âproject(boost::numeric::ublas::matrix_column<boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<long unsigned int, long int>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >&, boost::numeric::ublas::basic_range<long unsigned int, long int>)â
metodi_iterativi_blas.cpp:166: instantiated from here
/usr/include/boost/numeric/ublas/lu.hpp:146: error: no matching function for call to âproject(boost::numeric::ublas::matrix_column<boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<long unsigned int, long int>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >&, boost::numeric::ublas::basic_range<long unsigned int, long int>)â
metodi_iterativi_blas.cpp:166: instantiated from here
/usr/include/boost/numeric/ublas/lu.hpp:150: error: no matching function for call to âproject(boost::numeric::ublas::matrix_column<boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<long unsigned int, long int>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >&, boost::numeric::ublas::basic_range<long unsigned int, long int>)â
/usr/include/boost/numeric/ublas/lu.hpp:150: error: no matching function for call to âproject(boost::numeric::ublas::matrix_row<boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<long unsigned int, long int>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >&, boost::numeric::ublas::basic_range<long unsigned int, long int>)â
make: *** [metodi_iterativi_blas] Error 1