Boost logo

Ublas :

Subject: [ublas] generalized vector of vector
From: Isaia Nisoli (isaia.nisoli_at_[hidden])
Date: 2011-08-29 16:44:29


I'm sorry to post this question, but I've some difficulties in understanding
the source code for generalized vector of vector.

I'm using a

typedef generalized_vector_of_vector<APFloat, row_major,
boost::numeric::ublas::vector<compressed_vector<APFloat> > >
VVMatrixND;

where APFloat is a dd_real type from the library dd.

My (stupid) question is that I would like to push_back the results of the
computation at the end of each one of the row vectors, i.e., I would like to
do something similar to

VVMatrixND B;

computation of the element (i,j), we call it mix
B[i].push_back(mix);

How do I do such a thing, I tried with append_element

B.append_element(i,j,normmix);

but I get a big blob at compile time

/usr/include/boost/numeric/ublas/vector_of_vector.hpp: In member function
‘void boost::numeric::ublas::generalized_vector_of_vector<T, L,
A>::append_element(boost::numeric::ublas::generalized_vector_of_vector<T,
L, A>::size_type,
boost::numeric::ublas::generalized_vector_of_vector<T, L,
A>::size_type, const T&) [with T = dd_real, L =
boost::numeric::ublas::basic_row_major<>, A =
boost::numeric::ublas::vector&lt;boost::numeric::ublas::compressed_vector&lt;dd_real&gt;
>, boost::numeric::ublas::generalized_vector_of_vector&lt;T, L,
A&gt;::size_type = long unsigned int, const T& = const dd_real&]’:
srmatrix.cxx:38:38: instantiated from here
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:311:50: error: ‘class
boost::numeric::ublas::generalized_vector_of_vector&lt;dd_real,
boost::numeric::ublas::basic_row_major&lt;&gt;,
boost::numeric::ublas::vector&lt;boost::numeric::ublas::compressed_vector&lt;dd_real&gt;
> >::vector_data_value_type’ has no member named ‘append_element’
/usr/include/boost/numeric/ublas/vector_of_vector.hpp:311:50: error:
return-statement with a value, in function returning 'void'

that seems to say that gen. vector of vector has no member append_element...

Would be grateful if you could help me!

Bests
Isaia

--
View this message in context: http://boost.2283326.n4.nabble.com/generalized-vector-of-vector-tp3777353p3777353.html
Sent from the Boost - uBLAS mailing list archive at Nabble.com.