|
Boost Users : |
Subject: Re: [Boost-users] ranking of ublas vector
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-14 10:38:40
AMDG
Kraus Philipp wrote:
> 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.
I can't get this result.
In the code I gave, temp contains [3, 0, 2, 1] and
ranking contains [1, 3, 2, 0]
> The (mathematical) rank is: 3, 0, 2, 1 because
> the 3rd element is the smallest and the first the largest
> in the original vector.
In Christ,
Steven Watanabe
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