Boost logo

Ublas :

From: Andreas Dolfen (a.dolfen_at_[hidden])
Date: 2006-05-11 06:28:36


Hi,

you can simply calculate the difference of the two vectors and compare
the norm of the result with a small epsilon.

Andreas

dvir schirman wrote:
> Hi
>
> I want to compare between two vectors.
> I tried to write:
>
> vector<float> v1(3);
> vector <float> v2(3);
> if (v1==v2)
> {
> ...
> }
>
> Obviously it didn't work.
> Is there an operator which make this compare. Or should I do it for each
> element in the vector separately?
>
> Thanks.
> Dvir.
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas