最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
In the heap sorting in the previous section, we opened up additional space to construct and sort the heap. In this section, we optimize using in-situ heap sorting.
For a maximum heap, first exchange the starting position data with the value at the end of the array, then the end of the array is the largest element, then shift down the W element to regenerate the maximum heap, and then swap the newly generated maximum number with the penultimate position of the entire array, which is the penultimate big data everywhere, and so on.
The whole process can be shown in the following figure:
源码包下载: Download 
5.13.1. Java instance code ¶
Src/runoob/heap/HeapSort.java file code: ¶
package runoob.heap; import runoob.sort.SortTestHelper; /*\* \* 原地堆排序 */ public class HeapSort