Boost logo

Ublas :

Subject: Re: [ublas] request for sparse vector example
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2008-12-17 16:27:32


Jose schrieb:
> Hi,
>
> Is there an example of computing the cosine similarity of two sparse vectors ?
>
Have you been successful with this cosine similarity?

BTW. Did you mean

ublas::compressed_vector<double> x,y;
...
cos = inner_prod(x,y) / (norm_2(x) * norm_2(y)) ?

mfg
Gunter