List Info

Thread: (no subject)




(no subject)
user name
2006-05-30 15: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&gt; new_vec(vec.size);
 
but I got the following error:
&nbsp;
test_b3.cpp:19: error: no matching function for call to `boost::numeric::ublas::vector&lt;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> >]
&nbsp;
Thanks for your help.
&nbsp;
Dvir.
(no subject)
user name
2006-05-30 15:07:08
On Tuesday May 30 2006 11:02, dvir schirman wrote:
> vector<float> new_vec(vec.size);

Missing parens:

vector<float> new_vec( vec.size() );
_______________________________________________
ublas mailing list
ublaslists.boost.org
htt
p://lists.boost.org/mailman/listinfo.cgi/ublas
(no subject)
user name
2006-06-01 20:36:47
It appears to me that you should use
	vector<float> new_vec( vec.size() );


On Tue, 30 May 2006, dvir schirman wrote:

> 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.
>
_______________________________________________
ublas mailing list
ublaslists.boost.org
htt
p://lists.boost.org/mailman/listinfo.cgi/ublas
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )