860: int ilength = (int) length; 861: heapsort(cx, scope, na.dense, ilength, compare, cmpBuf); 862: return thisObj;
867: if (length >= Integer.MAX_VALUE) { 868: heapsort_extended(cx, scope, thisObj, length, compare, cmpBuf); 869: } else {
878: heapsort(cx, scope, working, ilength, compare, cmpBuf); 879:
936: /** Heapsort implementation. 937: * See "Introduction to Algorithms" by Cormen, Leiserson, Rivest for details.
939: */ 940: private static void heapsort(Context cx, Scriptable scope, 941: Object[] array, int length,
990: /** Version of heapsort that call getElem/setElem on target to query/assign 991: * array elements instead of Java array access 992: */ 993: private static void heapsort_extended(Context cx, Scriptable scope, 994: Scriptable target, long length,
Google Home - Google Code - Discuss - Terms of Service - Help - Submit Your Code
©2010 Google - Privacy