本文整理了Java中weka.core.Utils.conditionalSwap()
方法的一些代码示例,展示了Utils.conditionalSwap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.conditionalSwap()
方法的具体详情如下:
包路径:weka.core.Utils
类名称:Utils
方法名:conditionalSwap
[英]Conditional swap for quick sort.
[中]条件交换用于快速排序。
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Sorts left, right, and center elements only, returns resulting center as
* pivot.
*/
private static int sortLeftRightAndCenter(double[] array, int[] index, int l,
int r) {
int c = (l + r) / 2;
conditionalSwap(array, index, l, c);
conditionalSwap(array, index, l, r);
conditionalSwap(array, index, c, r);
return c;
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Sorts left, right, and center elements only, returns resulting center as
* pivot.
*/
private static int sortLeftRightAndCenter(double[] array, int[] index, int l,
int r) {
int c = (l + r) / 2;
conditionalSwap(array, index, l, c);
conditionalSwap(array, index, l, r);
conditionalSwap(array, index, c, r);
return c;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
conditionalSwap(array, index, left, right);
return;
case 2:
conditionalSwap(array, index, left, left + 1);
conditionalSwap(array, index, left, right);
conditionalSwap(array, index, left + 1, right);
return;
default:
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
conditionalSwap(array, index, left, right);
return left + k - 1;
case 2:
conditionalSwap(array, index, left, left + 1);
conditionalSwap(array, index, left, right);
conditionalSwap(array, index, left + 1, right);
return left + k - 1;
default:
代码示例来源:origin: Waikato/weka-trunk
conditionalSwap(array, index, left, right);
return;
case 2:
conditionalSwap(array, index, left, left + 1);
conditionalSwap(array, index, left, right);
conditionalSwap(array, index, left + 1, right);
return;
default:
代码示例来源:origin: Waikato/weka-trunk
conditionalSwap(array, index, left, right);
return left + k - 1;
case 2:
conditionalSwap(array, index, left, left + 1);
conditionalSwap(array, index, left, right);
conditionalSwap(array, index, left + 1, right);
return left + k - 1;
default:
内容来源于网络,如有侵权,请联系作者删除!