首页 | 本学科首页   官方微博 | 高级检索  
     

线对象邻接关系快速重构算法
引用本文:廖名学,范植华,何晓新.线对象邻接关系快速重构算法[J].计算机应用,2008,28(1):245-247.
作者姓名:廖名学  范植华  何晓新
作者单位:中国科学院软件研究所 中国科学院软件研究所 中国科学院软件研究所
摘    要:给定向量化坐标,计算n个线对象两两邻接关系,普通算法时间复杂度为O(n*n);理论最好时间复杂度为O(C),其中C是邻接关系的基数。基于散列桶,给出了建立线对象邻接关系的快速算法,其平均时间复杂度为O(n(1+1/r)),r为算法分配的桶数量与n的比,空间复杂度为O(n)。证明了若不允许使用额外空间,则不可能使用排序算法解决该问题;给出了允许使用额外空间条件下的两遍排序算法,时间复杂度为O(n(lbn+1+2/r))。应用表明快速算法比普通算法速度提高1~3个数量级。

关 键 词:桶排序    算法分析    线对象    邻接关系
文章编号:1001-9081(2008)01-0245-03
收稿时间:2007-07-11
修稿时间:2007年7月11日

Quick algorithm for reconstructing line object adjacency relations
LIAO Ming-xue,FAN Zhi-hua,HE Xiao-xin.Quick algorithm for reconstructing line object adjacency relations[J].journal of Computer Applications,2008,28(1):245-247.
Authors:LIAO Ming-xue  FAN Zhi-hua  HE Xiao-xin
Affiliation:LIAO Ming-xue,FAN Zhi-hua,HE Xiao-xin(Institute of Software,Chinese Academy of Sciences,Beijing 100080,China)
Abstract:Based on known coordinates of lines, the time complexity of usual algorithm for reconstructing adjacency relation among n line objects usually is O(n*n); in theory, its optimal value is at least O(C) and C is the cardinal number of adjacency relation. Based on hashed-bucket sorting, a quick algorithm with O(n(1+1/r)) average time complexity and with O(n) space complexity was given to reconstruct adjacency relation where r was the ratio of number of buckets used in the algorithm to n. It was proved that the problem can not be solved by sorting algorithm without extra space. With necessary extra space, a two-pass sorting algorithm with On(lb n+1+2/r)] time complexity, was also given. Applications show that the performance of the quick algorithm is over about 1~3 orders of magnitude higher than that of the usual algorithm.
Keywords:hashed-bucket sorting  algorithm analysis  line object  adjacency relation
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《计算机应用》浏览原始摘要信息
点击此处可从《计算机应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号