
AMDG Kraus Philipp wrote:
Am 14.03.2010 um 15:42 schrieb Steven Watanabe:
exp(-0) * vec(3), exp(-1) * vec(0), ... correct?
That's the correct option. in This case vec(3) hold the smallest entry in vec.
I think a hash map is a way to realize it, but I think it a little bit overkill for the problem. I need an iterator about the sorted elements in the vector
Okay, so in the code I gave, temp should give you a sorted view and ranking should give the indexes of elements in the sorted array. Given [4](0.405121, 0.943918, 0.887914, 0.338921) the code outputs 1 3 2 0 You can just match them up elementwise to get the correct exponents. If this doesn't work please post the complete code and output that demonstrates the problem. In Christ, Steven Watanabe