temperature

所属分类:数据结构
开发工具:Visual C++
文件大小:3KB
下载次数:23
上传日期:2013-10-10 11:03:15
上 传 者zhoujl10
说明:  择使用数组储存数据。*x,*y分别装入观察站的地理坐标,temp装入的是温度信息,*tpx,*tpy分别用作对x,y进行快速排序(tpx[2]=8表示排在第2位的是x[8],rank[8]=2表示x[8]排在第2位)升序,rankx[i]即为最终x[i]的排名。 为了方便计算一个范围内的温度值,定义了一个long long 型的数组sum。算出比点p小的点(不包括点p本身)的所有温度值之和sum,之后范围的四点sum相加减,再对少数点做处理即可得到范围内的温度之和。sum[i][j]表示的是rankx=i,ranky=j左下方的温度之和,相当于一个hashtable(映射关系)
(Optional use arrays to store data.* X,* y respectively, into the geographical coordinates of the Observatory, temp temperature information is loaded,* tpx,* tpy respectively used for x, y quick sort (tpx [2] = 8 means that in the first two rows of the is x [8], rank [8] = 2 means that x [8] ranked No. 2) ascending, rankx [i] shall be final and x [i] in the rankings. In order to facilitate the calculation of the temperature within a range that defines a long long type array sum. Point p is smaller than the calculated points (not including the point p itself) of all temperature values ​ ​ and the sum, sum the four points of the range after the addition and subtraction, then do not handle a small number of points can be obtained and a temperature within the range. sum [i] [j] represents the rankx = i, ranky = j the temperature of the lower left, the equivalent of a hashtable (mappings))

文件列表:
temperature_lib.c (1282, 2012-11-02)
Temperature.cpp (5352, 2012-12-08)
temperature.h (301, 2012-04-28)

近期下载者

相关文件


收藏者