首页> 外国专利> Quicksort which uses the average of the values in a sub-array as the pivot to sort that sub array

Quicksort which uses the average of the values in a sub-array as the pivot to sort that sub array

机译:Quicksort,它使用子数组中值的平均值作为对子数组进行排序的关键

摘要

The algorithm picks a pivot value and moves all the data values, which are less than the pivot, to the start of the array and all those values, which are larger than the pivot, to the end of the array. The algorithm is then applied recursively to the sub-array of numbers less than the pivot value and to the sub-array of numbers greater than the pivot value. During the initial sorting pass, the count and sum of the numbers less than the pivot and the count and the sum of the values greater than the pivot are calculated. These are then used to calculate the mean of the values less than the pivot and the mean of the values greater than the pivot. These values are then used as the pivot values for the next level of the recursive sort. A different algorithm may be used for sorting small arrays or sub-arrays.
机译:该算法选择一个枢轴值,并将所有小于该枢轴的数据值移到数组的开头,并将所有那些值都大于该枢轴,移到数组的末尾。然后将该算法递归应用于小于枢轴值的数字子数组和大于枢轴值的数字子数组。在初始排序过程中,将计算小于枢轴的数量的计数和总和,以及大于枢轴的值的计数和总和。然后将这些用于计算小于枢轴的值的平均值和大于枢轴的值的平均值。然后将这些值用作递归排序的下一个级别的枢轴值。可以使用不同的算法对小数组或子数组进行排序。

著录项

  • 公开/公告号GB2482724A

    专利类型

  • 公开/公告日2012-02-15

    原文格式PDF

  • 申请/专利权人 ROSEN ANGELOV STEFANOV;

    申请/专利号GB20100013596

  • 发明设计人 ROSEN ANGELOV STEFANOV;

    申请日2010-08-10

  • 分类号G06F7/24;

  • 国家 GB

  • 入库时间 2022-08-21 17:03:26

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号