检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:黄明志 HUANG Ming-zhi(School of Information Science and Technology,Zhongkai University of Agriculture and Engineering,Guangzhou 510225)
机构地区:[1]仲恺农业工程学院信息科学与技术学院,广州510225
出 处:《现代计算机》2018年第24期90-95,共6页Modern Computer
摘 要:提出使用二叉堆作为元素的存储结构,设计基于.NET的优先级队列,实现根据元素的默认比较器或指定的比较器,将优先级别最高的元素首先出队的泛型集合类PriorityQueue<T>。类中的入队和出队操作的时间复杂度均为O(logN),Peek操作的时间复杂度为O(1)。且因其设计的框架结构、命名规则和风格等完全与.NET中System.Collec-tions.Generic命名空间的相关泛型集合类、特别是Queue<T>类的接口和使用方法相一致,故其具有良好的通用性和柔韧性。Proposes binary heap as the elements of storage structure, designs the priority queue for comparison according to the elements of the default or a specified comparer, highest priority element first output of a generic collection class named PriorityQueue<T> based on.NET. The time complexity of method for Enqueue and Dequeue in the class is O(logN), time complexity of Peek is O(1), and because of its design,frame structure, naming and style is completely consistent to the related generic collection classes, in particular Queue<T> in the namespace Sytem.Collections.Generic based on.NET, and therefore has good versatility and flexibility.
分 类 号:TP311.12[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.128.197.221