Boost logo

Ublas :

From: Ralf Denzer (denzer_at_[hidden])
Date: 2005-01-21 10:07:45


Hi Michael,
> Does that fix you problem?

Unfortunately, no.

Here is my test case:

#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/matrix.hpp>

namespace ublas = boost::numeric::ublas;

int main()
{
   // a vector of matrices
   ublas::vector<ublas::matrix<double> > vofm;

   // allocate a vector of 10 matrices
   vofm.resize(10);
   // allocate the 1st matrix as 3x3
   vofm(0).resize(3,3);
}

And the compiler output: (g++ 3.3.5)

if g++ -DHAVE_CONFIG_H -I. -I/home/denzer/Projects/vector_of_matrices/src -I.. -I/home/denzer/local/src/boost.all/boost -O0 -g3
-Wall -ansi -MT vector_of_matrices.o -MD -MP -MF ".deps/vector_of_matrices.Tpo" -c -o vector_of_matrices.o
/home/denzer/Projects/vector_of_matrices/src/vector_of_matrices.cpp; then mv -f ".deps/vector_of_matrices.Tpo"
".deps/vector_of_matrices.Po"; else rm -f ".deps/vector_of_matrices.Tpo"; exit 1; fi
/home/denzer/local/src/boost.all/boost/boost/numeric/ublas/vector.hpp: In
member function `void boost::numeric::ublas::vector<T, A>::resize(typename
A::size_type, bool) [with T = boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, A
=
boost::numeric::ublas::unbounded_array<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
std::allocator<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >
>]':
/home/denzer/Projects/vector_of_matrices/src/vector_of_matrices.cpp:12: instantiated from here
/home/denzer/local/src/boost.all/boost/boost/numeric/ublas/vector.hpp:96: error: no matching function for call to
`boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >:: matrix(int)'
/home/denzer/local/src/boost.all/boost/boost/numeric/ublas/matrix.hpp:100: error: candidates are: boost::numeric::ublas::matrix<T,
L, A>::matrix(const boost::numeric::ublas::matrix<T, L, A>&) [with T = double, L = boost::numeric::ublas::basic_row_major<size_t,
ptrdiff_t>, A = boost::numeric::ublas::unbounded_array<double, std::allocator<double> >]
/home/denzer/local/src/boost.all/boost/boost/numeric/ublas/matrix.hpp:96: error: boost::numeric::ublas::matrix<T, L,
A>::matrix(typename A::size_type, typename A::size_type, const A&) [with T = double, L =
boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>, A = boost::numeric::ublas::unbounded_array<double, std::allocator<double> >]
/home/denzer/local/src/boost.all/boost/boost/numeric/ublas/matrix.hpp:91: error: boost::numeric::ublas::matrix<T, L,
A>::matrix(typename A::size_type, typename A::size_type) [with T = double, L = boost::numeric::ublas::basic_row_major<size_t,
ptrdiff_t>, A = boost::numeric::ublas::unbounded_array<double, std::allocator<double> >]
/home/denzer/local/src/boost.all/boost/boost/numeric/ublas/matrix.hpp:87: error: boost::numeric::ublas::matrix<T, L, A>::matrix()
[with T = double, L = boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>, A = boost::numeric::ublas::unbounded_array<double,
std::allocator<double> >]
make[2]: *** [vector_of_matrices.o] Error 1

Best regards

Ralf

PS: to get the latest changes of uBLAS I did

cvs -d:pserver:anonymous_at_[hidden]:/cvsroot/boost login
cvs -z3 -d:pserver:anonymous_at_[hidden]:/cvsroot/boost checkout boost

Is this correct. Some times ago there was also the repository
cvs -d:pserver:anonymous_at_[hidden]:/cvsroot/ublas login
cvs -z3 -d:pserver:anonymous_at_[hidden]:/cvsroot/ublas co uBLAS
Is this obsolete?

-- 
Ralf Denzer
Email: denzer_at_[hidden]