附有本人超级详细解释(看不懂的面壁十天!) 一、 实际问题: 希尔排序(Shell Sort)是插入排序的一种。因D.L.Shell于1959年提出而得名。它又称“缩小增量分类法”,在时间效率上比插入、比较、冒泡等排序算法有了较大改进。能对无序序列按一定规律进行排序。 二、数学模型: 先取一个小于n的整数d1作为第一个增量,把文件的全部记录分成d1个组。所有距离为dl的倍数的记录放在同一个组中。先在各组内进行直接插人排序;然后,取第二个增量d2<d1重复上述的分组和排序,直至所取的增量dt=1(dt<dt-l<…<d2<d1),即所有记录放在同一组中进行直接插入排序为止。该方法实质上是一种分组插入方法。 三、算法设计: 1、将相隔某个增量dlta[k]的元素构成一个子序列。在排序过程中,逐次减小这个增量,最后当h减到1时,进行一次插入排序,排序就完成。增量序列一般采用:dlta[k]=2t-k+1-1,其中t为排序趟数,1≤k≤t≤[log2 (n+1)],其中n为待排序序列的长度。按增量序列dlta[0..t-1]。 2、按增量dlta[k](1≤k≤t≤[log2 (n+1)])进行一趟希尔插入排序。 3、在主函数中控制程序执行流程。 4、时间复杂度:1≤k≤t≤[log2 (n+1)]时为O(n3/2)。
上传时间: 2013-12-11
上传用户:天涯
现在市面上流行的3D游戏画面越来越炫目,不过也有一些为了营造一种特殊的效果而使用了卡通渲染技术,比如PC游戏中的《杀手XIII》,《忍者神龟》;PS2游戏中的《真红之泪》,《犬夜叉》等等。这些游戏的画面看上去很像漫画,感觉比较有趣。下面就介绍一种简单的实现方法。 所谓用卡通渲染技术绘制的三维物体一般都有两个明显的特征,一个特征是物体表面覆盖着大块的单调颜色,而且光影变化比较剧烈;另一个特征是物体拥有粗重的边缘效果。如果能自己控制光照和阴影,就可以达到目的。而DirectX 9.0 中的顶点渲染(Vertex Shaders)提供了这样一个途径,使我们可以实现自己的想法。 顶点渲染与以前的T&L在渲染流程中处于二选一的地位,一段代码最多只能有128条指令,而且不能有循环,判断和跳转指令,全是线性执行指令。每次只能有一个Shader程序是激活的,Vertex Shaders让我们可以实时地控制模型的空间变换,光照处理以及像素渲染。 那么现在先来解决第一个问题。我们可以用光线的亮度值作为物体的纹理坐标,这就产生一种带状纹理的效果,然后再调整相应的颜色即可。
上传时间: 2013-12-10
上传用户:ruan2570406
These instructions assume that the 1.4 versions of the java and appletviewer commands are in your path. If they aren t, then you should either specify the complete path to the commands or update your PATH environment variable as described in the installation instructions for the Java 2 SDK.
标签: instructions appletviewer the commands
上传时间: 2015-06-01
上传用户:3到15
能自动计算总分、平均分及格率等各种统计数据。在统计时你还可以选择统计全部学科或部分学科;在使用中可自由增删成绩、人员,学科,及学科改名功能;自由设置卷面总分、及格线、分数段间隔、综合分,学校名,用户名,背景等. vqqq自动取款机 (A.T.M.).exe是一个银行的 自动取款机 (A.T.M.) 程序,可以让你在电脑上取银行的钱,只要有密码就可以 59r.com_CD播放器.exe是一个非常不错的 免费 CD播放器,超级酷,可以播放你的 cd ,有很多工能呀!
上传时间: 2015-06-04
上传用户:yangbo69
good book which should be read by the person who want to lean more about DRM, it is very important to give me feedback thx you
标签: important should person about
上传时间: 2013-12-07
上传用户:qw12
C-C方法及改进的C-C方法重构相空间的matlab程序 -------------------------------- 性能: 3000数据耗时3分钟 -------------------------------- 参考文献: 1、Nonlinear dynamics, delay times, and embedding windows.pdf 2、基于改进的C-C方法的相空间重构参数选择4.pdf -------------------------------- 文件夹说明: 1、C_C_Method_luzhenbo2.m - 程序主文件,直接运行此文件即可! 2、LorenzData.dll - 产生Lorenz离散数据 3、DuffingData.dll - 产生Duffing离散数据 4、RosslerData.dll - 产生Rossler离散数据 5、ccFunction.dll - 计算S(m,N,r,t) - 原C-C方法中计算S(m,N,r,t),改进的C-C方法中计算S2(m,N,r,t) 6、ccFunction_luzhenbo.dll - 计算S(m,N,r,t) - 改进的C-C方法中计算S1(m,N,r,t) -------------------------------- 致谢: 此稿本次修改的部分灵感来源于与研学论坛网友“张文鸽”和“yangfanboy”的讨论,在此表示感谢!
上传时间: 2015-06-08
上传用户:lo25643
Euler方法解 程序,使之适用于任意右端函数f,任意步长h和任意区间[to,T]。用h=1/4,1/8,1/16分别计算初值问题
上传时间: 2015-06-09
上传用户:缥缈
一个游戏 the hardware for the game includes a number of displays, each with a button and -- a light, that each represent a bin that can store marbles (beans). -- -- The display indicates the number of marbles in each bin at any given time. -- The light indecates that the present bin is not empty and that pushing the -- button is a valid move in the game. -- -- The button for each display indicates that a player takes the marbles from -- the selected bin, and takes them in his hand. The hand is represented by a -- diplay itself (no button). -- -- Each player has a home bin, located on opposite sides of the game.
标签: the hardware displays includes
上传时间: 2015-06-10
上传用户:cc1015285075
This program uses the database created by MakeAPIDB. It opens a connection * to a database using the same property file used by MakeAPIDB. Then it * queries that database in several interesting ways to obtain useful * information about Java APIs. It can be used to look up the fully-qualified * name of a member, class, or package, or it can be used to list the members * of a class or package.
标签: database connection MakeAPIDB program
上传时间: 2013-11-25
上传用户:miaochun888
传真通信国家标准,相当于ITU - T T.30协议。文件传真三类机在电话网中的互通技术条件 第2部分:在公用电话交换网上的文件传真传输规程
上传时间: 2013-12-18
上传用户:txfyddz