weka.core.Utils.conditionalSwap()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(109)

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

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:

相关文章