Boost logo

Boost Users :

Subject: Re: [Boost-users] ranking of ublas vector
From: Kraus Philipp (philipp.kraus_at_[hidden])
Date: 2010-03-14 08:08:05


> Oops. I guess I didn't understand exactly what you wanted. The
> temp vector, should contain the result you want.
>
> In Christ,
> Steven Watanabe

There is an error:

I create a random vector like:

[4](0.405121, 0.943918, 0.887914, 0.338921)

I think it's clear that:
0.338921 < 0.405121 < 0.887914 < 0.943918

The code returns: [4](2,0,1,3) and that's wrong
because the 2nd element is not the smallest value.

The (mathematical) rank is: 3, 0, 2, 1 because
the 3rd element is the smallest and the first the largest
in the original vector.

I hope that's clearer

Thanks

Phil


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net