[ImageJ-bugs] [Bug 1003] Array.rankPositions does not order positions correctly
bugzilla at fiji.sc
bugzilla at fiji.sc
Wed Feb 11 19:06:13 CST 2015
http://fiji.sc/bugzilla/show_bug.cgi?id=1003
Wayne Rasband <wsr at nih.gov> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |wsr at nih.gov
Resolution|--- |WONTFIX
--- Comment #1 from Wayne Rasband <wsr at nih.gov> ---
This is the expected behavior. The rankPositions() function returns the rank
positions as indexes, starting with index of smallest value. Get the rank
positions of the indexes to get the ranks. Here is an example:
test = newArray(15, 10, 50, 20, 40, 1, 2, 3);
rank_pos = Array.rankPositions(test);
rank = Array.rankPositions(rank_pos);
Array.show(test, rank_pos, rank);
And here is the output:
test rank_pos rank
155 5 4
10 6 3
50 7 7
20 1 5
40 0 6
1 3 0
2 4 1
3 2 2
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20150212/07cd2b3b/attachment-0001.html>
More information about the Imagej-bugs
mailing list