Boost logo

Ublas :

From: dvir schirman (dvir.boost_at_[hidden])
Date: 2006-05-30 11:02:25


Hi

I want to declare a new vector "new_vec" at the same size as an existing
vector "vec".
I tried to use:

vector<float> new_vec(vec.size);

but I got the following error:

test_b3.cpp:19: error: no matching function for call to
`boost::numeric::ublas::vector<float,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> >
>::vector(<unknown type>)'
../boost/boost/numeric/ublas/vector.hpp:66: note: candidates are:
boost::numeric::ublas::vector<T, A>::vector(const
boost::numeric::ublas::vector<T, A>&) [with T = float, A =
boost::numeric::ublas::unbounded_array<float, std::allocator<float> >]
../boost/boost/numeric/ublas/vector.hpp:62: note:
boost::numeric::ublas::vector<T, A>::vector(typename A::size_type, const A&)
[with T = float, A = boost::numeric::ublas::unbounded_array<float,
std::allocator<float> >]
../boost/boost/numeric/ublas/vector.hpp:57: note:
boost::numeric::ublas::vector<T, A>::vector(typename A::size_type) [with T =
float, A = boost::numeric::ublas::unbounded_array<float,
std::allocator<float> >]
../boost/boost/numeric/ublas/vector.hpp:53: note:
boost::numeric::ublas::vector<T, A>::vector() [with T = float, A =
boost::numeric::ublas::unbounded_array<float, std::allocator<float> >]

Thanks for your help.

Dvir.