极速微分催化计算排序 The Top Sort, 测试随机 单机 每秒 排序 1150万 double 数组对象+ 速度.

package org.tinos.deta.statistic;
//基于算法导论快排4衍生极速小高峰缺陷过滤理论快速排序第9代完美版本 线性数字数组排序法函数Java完整版本实现。
//思想:算法导论快排4理论,罗瑶光小高峰过滤理论,优化 催化波动算子duplication 思想, 减少条件递规深度思想。流水阀门优化思想.
//实现:罗瑶光
//时间:20140101~ 20200714
public class LYG9DWithDoubleQuickSort4D{
int range;
int deeps;
public double[] sort(double[] array, int range, int deeps) {
this.range= range;
this.deeps= deeps;
processDouble(array, 0, array.length- 1, 0);
return array;
}

private void processDouble(double[] array, int leftPoint, int rightPoint, int deep) {
	int c= rightPoint- leftPoint;
	if(!(c< this.range|| deep> this.deeps)) {//balance催化减少条件递规深度思想。//流水阀门优化思想。
		int pos= partition(array, leftPoint, rightPoint);
  			if(leftPoint< pos- 1){
    			processDouble(array, leftPoint, pos- 1, deep+ 1);//减少条件递规深度思想。
 	 		}
  			if(pos+ 1< rightPoint){
    			processDouble(array, pos+ 1, rightPoint, deep+ 1);//减少条件递规深度思想。
  			}
		return;
	}
  		int i= leftPoint;
	for(int j= i+ 1; j<= leftPoint+ c; j= i++){
		while(j> leftPoint){
			if(array[j]< array[--j]){//催化波动算子duplication 思想
				double temp= array[j+ 1];
				array[j+ 1]= array[j];
				array[j]= temp;
			}
		}
	}	
}
private int partition(double[] array, int leftPoint, int rightPoint) {
	double x= array[leftPoint]<= array[rightPoint]? array[leftPoint]: array[rightPoint];//小高峰过滤饱和催化减少条件递规深度思想。
	int leftPointReflection= leftPoint;
	while(leftPointReflection++ < rightPoint){//催化波动算子duplication 思想
		while(!(array[leftPointReflection++]> x|| leftPointReflection> rightPoint)) {}//催化波动算子duplication 思想
		while(array[rightPoint--]> x){}//催化波动算子duplication 思想
		if(--leftPointReflection< ++rightPoint){//催化波动算子duplication 思想
			double temp= array[rightPoint];
			array[rightPoint]= array[leftPointReflection];
			array[leftPointReflection]= temp;
		}
	}
	array[leftPoint]= array[rightPoint];
	array[rightPoint]= x;//小高峰过滤饱和催化减少条件递规深度思想。
	return rightPoint;
}

}

//topSORT 5D 加了个等于, 还有优化空间,准备设计6代 极快速催化排序算法。

文件资源
1 jar: https://github.com/yaoguangluo/ChromosomeDNA/blob/main/BloomChromosome_V19001_20220108.jar
2 book 《DNA元基催化与肽计算 第四修订版 V00919》上下册
https://github.com/yaoguangluo/ChromosomeDNA/tree/main/元基催化与肽计算第四修订版本整理

3 函数在git的存储地址:demos
Github:https://github.com/yaoguangluo/ChromosomeDNA/
Coding:https://yaoguangluo.coding.net/public/YangLiaoJingHuaRuiJi/YangliaojingHuaruiji/
Bitbucket:https://bitbucket.org/luoyaoguang/yangliaojing/
Gitee:https://gitee.com/DetaChina/

4 uml: https://blog.youkuaiyun.com/weixin_38249398/category_11647527.html

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

罗瑶光19850525

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值