java.util.Arrays.mergeSort()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中java.util.Arrays.mergeSort()方法的一些代码示例,展示了Arrays.mergeSort()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arrays.mergeSort()方法的具体详情如下:
包路径:java.util.Arrays
类名称:Arrays
方法名:mergeSort

Arrays.mergeSort介绍

[英]Src is the source array that starts at index 0 Dest is the (possibly larger) array destination with a possible offset low is the index in dest to start sorting high is the end index in dest to end sorting off is the offset to generate corresponding low, high in src To be removed in a future release.
[中]Src是从索引0开始的源数组Dest是(可能更大的)数组目标,可能偏移量较低Dest是要开始排序的Dest中的索引较高Dest是要结束排序的Dest中的结束索引off是要生成相应的低、高Src的偏移量,将在将来的版本中删除。

代码示例

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/** To be removed in a future release. */
private static <T> void legacyMergeSort(T[] a, Comparator<? super T> c) {
  T[] aux = a.clone();
  if (c==null)
    mergeSort(aux, a, 0, a.length, 0);
  else
    mergeSort(aux, a, 0, a.length, 0, c);
}

代码示例来源:origin: jtulach/bck2brwsr

/** To be removed in a future release. */
private static <T> void legacyMergeSort(T[] a, Comparator<? super T> c) {
  T[] aux = a.clone();
  if (c==null)
    mergeSort(aux, a, 0, a.length, 0);
  else
    mergeSort(aux, a, 0, a.length, 0, c);
}

代码示例来源:origin: dragome/dragome-sdk

/** To be removed in a future release. */
private static <T> void legacyMergeSort(T[] a, Comparator<? super T> c) {
  T[] aux = a.clone();
  if (c==null)
    mergeSort(aux, a, 0, a.length, 0);
  else
    mergeSort(aux, a, 0, a.length, 0, c);
}

代码示例来源:origin: stackoverflow.com

java.lang.NullPointerException
 at entitybeans.jpa.MovieFacade$1.compare(MovieFacade.java:65)
 at java.util.Arrays.mergeSort(Arrays.java:1270)
 at java.util.Arrays.sort(Arrays.java:1210)
 at java.util.Collections.sort(Collections.java:159)
 at entitybeans.jpa.MovieFacade.findRange(MovieFacade.java:61)
 ...

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/** To be removed in a future release. */
private static <T> void legacyMergeSort(T[] a, int fromIndex, int toIndex,
                    Comparator<? super T> c) {
  rangeCheck(a.length, fromIndex, toIndex);
  T[] aux = copyOfRange(a, fromIndex, toIndex);
  if (c==null)
    mergeSort(aux, a, fromIndex, toIndex, -fromIndex);
  else
    mergeSort(aux, a, fromIndex, toIndex, -fromIndex, c);
}

代码示例来源:origin: dragome/dragome-sdk

/** To be removed in a future release. */
private static <T> void legacyMergeSort(T[] a, int fromIndex, int toIndex,
                    Comparator<? super T> c) {
  rangeCheck(a.length, fromIndex, toIndex);
  T[] aux = copyOfRange(a, fromIndex, toIndex);
  if (c==null)
    mergeSort(aux, a, fromIndex, toIndex, -fromIndex);
  else
    mergeSort(aux, a, fromIndex, toIndex, -fromIndex, c);
}

代码示例来源:origin: jtulach/bck2brwsr

/** To be removed in a future release. */
private static <T> void legacyMergeSort(T[] a, int fromIndex, int toIndex,
                    Comparator<? super T> c) {
  rangeCheck(a.length, fromIndex, toIndex);
  T[] aux = copyOfRange(a, fromIndex, toIndex);
  if (c==null)
    mergeSort(aux, a, fromIndex, toIndex, -fromIndex);
  else
    mergeSort(aux, a, fromIndex, toIndex, -fromIndex, c);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/** To be removed in a future release. */
private static void legacyMergeSort(Object[] a,
                  int fromIndex, int toIndex) {
  rangeCheck(a.length, fromIndex, toIndex);
  Object[] aux = copyOfRange(a, fromIndex, toIndex);
  mergeSort(aux, a, fromIndex, toIndex, -fromIndex);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/** To be removed in a future release. */
private static void legacyMergeSort(Object[] a) {
  Object[] aux = a.clone();
  mergeSort(aux, a, 0, a.length, 0);
}

代码示例来源:origin: dragome/dragome-sdk

/** To be removed in a future release. */
private static void legacyMergeSort(Object[] a) {
  Object[] aux = a.clone();
  mergeSort(aux, a, 0, a.length, 0);
}

代码示例来源:origin: dragome/dragome-sdk

/** To be removed in a future release. */
private static void legacyMergeSort(Object[] a,
                  int fromIndex, int toIndex) {
  rangeCheck(a.length, fromIndex, toIndex);
  Object[] aux = copyOfRange(a, fromIndex, toIndex);
  mergeSort(aux, a, fromIndex, toIndex, -fromIndex);
}

代码示例来源:origin: jtulach/bck2brwsr

/** To be removed in a future release. */
private static void legacyMergeSort(Object[] a) {
  Object[] aux = a.clone();
  mergeSort(aux, a, 0, a.length, 0);
}

代码示例来源:origin: jtulach/bck2brwsr

/** To be removed in a future release. */
private static void legacyMergeSort(Object[] a,
                  int fromIndex, int toIndex) {
  rangeCheck(a.length, fromIndex, toIndex);
  Object[] aux = copyOfRange(a, fromIndex, toIndex);
  mergeSort(aux, a, fromIndex, toIndex, -fromIndex);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

high += off;
int mid = (low + high) >>> 1;
mergeSort(dest, src, low, mid, -off);
mergeSort(dest, src, mid, high, -off);

代码示例来源:origin: dragome/dragome-sdk

high += off;
int mid = (low + high) >>> 1;
mergeSort(dest, src, low, mid, -off);
mergeSort(dest, src, mid, high, -off);

代码示例来源:origin: org.apidesign.bck2brwsr/emul

high += off;
int mid = (low + high) >>> 1;
mergeSort(dest, src, low, mid, -off, c);
mergeSort(dest, src, mid, high, -off, c);

代码示例来源:origin: dragome/dragome-sdk

high += off;
int mid = (low + high) >>> 1;
mergeSort(dest, src, low, mid, -off, c);
mergeSort(dest, src, mid, high, -off, c);

代码示例来源:origin: jtulach/bck2brwsr

high += off;
int mid = (low + high) >>> 1;
mergeSort(dest, src, low, mid, -off, c);
mergeSort(dest, src, mid, high, -off, c);

代码示例来源:origin: jtulach/bck2brwsr

high += off;
int mid = (low + high) >>> 1;
mergeSort(dest, src, low, mid, -off);
mergeSort(dest, src, mid, high, -off);

相关文章