<html>
    <head>
      <base href="http://fiji.sc/bugzilla/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:wsr@nih.gov" title="Wayne Rasband <wsr@nih.gov>"> <span class="fn">Wayne Rasband</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - Array.rankPositions does not order positions correctly"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1003">bug 1003</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>wsr@nih.gov
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WONTFIX
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - Array.rankPositions does not order positions correctly"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1003#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - Array.rankPositions does not order positions correctly"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1003">bug 1003</a>
              from <span class="vcard"><a class="email" href="mailto:wsr@nih.gov" title="Wayne Rasband <wsr@nih.gov>"> <span class="fn">Wayne Rasband</span></a>
</span></b>
        <pre>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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>