id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4860,Rational does not play well with uBlas,pierluigi.rolando@…,Gunter,"I'm trying to solve a rational linear system using boost/rational + uBlas. I've tried to copy many examples on the web that all follow the same line: {{{ typedef permutation_matrix pmatrix; pmatrix pm(a.size1()); matrix_t inverse(a.size1(), a.size2()); lu_factorize(a, pm); inverse.assign(identity_matrix(a.size1())); lu_substitute(a, pm, inverse); }}} a is of type matrix_t, which is defined as follows: {{{ typedef rational rational_t; typedef matrix matrix_t; }}} Compilation fails on the lu_factorize function call with the following error messages: {{{ In file included from interpolator.cpp:5: /usr/local/include/boost/numeric/ublas/lu.hpp: In function ‘void boost::numeric::ublas::swap_rows(const PM&, MV&, boost::numeric::ublas::matrix_tag) [with PM = boost::numeric::ublas::permutation_matrix, boost::numeric::ublas::unbounded_array, std::allocator > > >, MV = boost::numeric::ublas::matrix, boost::numeric::ublas::basic_row_major, boost::numeric::ublas::unbounded_array, std::allocator > > >]’: /usr/local/include/boost/numeric/ublas/lu.hpp:90: instantiated from ‘void boost::numeric::ublas::swap_rows(const PM&, MV&) [with PM = boost::numeric::ublas::permutation_matrix, boost::numeric::ublas::unbounded_array, std::allocator > > >, MV = boost::numeric::ublas::lu_factorize(M&, PM&) [with M = matrix_t, PM = main()::pmatrix]::matrix_type]’ /usr/local/include/boost/numeric/ublas/lu.hpp:165: instantiated from ‘typename M::size_type boost::numeric::ublas::lu_factorize(M&, PM&) [with M = matrix_t, PM = main()::pmatrix]’ interpolator.cpp:122: instantiated from here /usr/local/include/boost/numeric/ublas/lu.hpp:83: error: no matching function for call to ‘row(boost::numeric::ublas::matrix, boost::numeric::ublas::basic_row_major, boost::numeric::ublas::unbounded_array, std::allocator > > >&, const boost::rational&)’ /usr/local/include/boost/numeric/ublas/matrix_proxy.hpp:466: note: candidates are: boost::numeric::ublas::matrix_row boost::numeric::ublas::row(M&, typename M::size_type) [with M = boost::numeric::ublas::matrix, boost::numeric::ublas::basic_row_major, boost::numeric::ublas::unbounded_array, std::allocator > > >] /usr/local/include/boost/numeric/ublas/matrix_proxy.hpp:471: note: const boost::numeric::ublas::matrix_row boost::numeric::ublas::row(const M&, typename M::size_type) [with M = boost::numeric::ublas::matrix, boost::numeric::ublas::basic_row_major, boost::numeric::ublas::unbounded_array, std::allocator > > >] }}} It looks like the two libraries do not play well together, which means that Boost is basically useless for what I'm trying to do :-/ ",Bugs,new,To Be Determined,uBLAS,Boost 1.44.0,Problem,,,