Boost logo

Ublas :

From: Nico Galoppo (nico_at_[hidden])
Date: 2006-07-05 09:44:14


Gunter Winkler wrote:
> The default assignment should be very fast. Make sure you have defined NDEBUG
>
> compressed_matrix<double, row_major> B(size,size,A.nnz());
> B.assign(A);
>
> I attach another one of my timing examples.

Gunter,

thanks so much for all your trouble. Unfortunately, we seem to be using
different version of boost/ublas. My
generalized_vector_of_vector< double, row_major,
vector<compressed_vector<double> > > doesn't seem to have nnz():

error C2039: 'nnz' : is not a member of
'boost::numeric::ublas::generalized_vector_of_vector<T,L,A>'

I also tried to compile your example program with g++/Cygwin:

$ g++ -I /cygdrive/d/dev/boost -D NDEBUG -O2 sparse_fill3.cpp -o sparse_fill3
sparse_fill3.cpp: In function `int main(int, char**)':
sparse_fill3.cpp:170: error: 'class
boost::numeric::ublas::generalized_vector_of_vector<double,
boost::numeric::ublas::row_major,
boost::numeric::ublas::vector<boost::numeric::ublas::coordinate_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
boost::numeric::ublas::unbounded_array<boost::numeric::ublas::coordinate_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
std::allocator<boost::numeric::ublas::coordinate_vector<double, 0u,
boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > > > >
>' has no member named 'nnz'
sparse_fill3.cpp:170: error: 'class
boost::numeric::ublas::generalized_vector_of_vector<double,
boost::numeric::ublas::row_major,
boost::numeric::ublas::vector<boost::numeric::ublas::coordinate_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
boost::numeric::ublas::unbounded_array<boost::numeric::ublas::coordinate_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
std::allocator<boost::numeric::ublas::coordinate_vector<double, 0u,
boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > > > >
>' has no member named 'nnz_capacity'
sparse_fill3.cpp:171: error: 'class
boost::numeric::ublas::generalized_vector_of_vector<double,
boost::numeric::ublas::row_major,
boost::numeric::ublas::vector<boost::numeric::ublas::coordinate_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
boost::numeric::ublas::unbounded_array<boost::numeric::ublas::coordinate_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
std::allocator<boost::numeric::ublas::coordinate_vector<double, 0u,
boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > > > >
>' has no member named 'nnz'
sparse_fill3.cpp:197: error: 'class
boost::numeric::ublas::generalized_vector_of_vector<double,
boost::numeric::ublas::row_major,
boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
boost::numeric::ublas::unbounded_array<boost::numeric::ublas::compressed_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
std::allocator<boost::numeric::ublas::compressed_vector<double, 0u,
boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > > > >
>' has no member named 'nnz'
sparse_fill3.cpp:197: error: 'class
boost::numeric::ublas::generalized_vector_of_vector<double,
boost::numeric::ublas::row_major,
boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
boost::numeric::ublas::unbounded_array<boost::numeric::ublas::compressed_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
std::allocator<boost::numeric::ublas::compressed_vector<double, 0u,
boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > > > >
>' has no member named 'nnz_capacity'
sparse_fill3.cpp:198: error: 'class
boost::numeric::ublas::generalized_vector_of_vector<double,
boost::numeric::ublas::row_major,
boost::numeric::ublas::vector<boost::numeric::ublas::compressed_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
boost::numeric::ublas::unbounded_array<boost::numeric::ublas::compressed_vector<double,
0u, boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
std::allocator<boost::numeric::ublas::compressed_vector<double, 0u,
boost::numeric::ublas::unbounded_array<size_t, std::allocator<size_t> >,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > > > >
>' has no member named 'nnz'

-- 
Nico Galoppo           UNC-CH :: ETHZ         http://www.ngaloppo.org
                        +41-77-4319939