• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

sphinxy/DataStructures: Concurrent priority queue and skip list for .NET

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

sphinxy/DataStructures

开源软件地址:

https://github.com/sphinxy/DataStructures

开源编程语言:

C# 100.0%

开源软件介绍:

C# implementations of some usefull data sctructures for .NET

##Priority queue Heap-based generic concurrent priority queue for .NET

Priority queue is an abstract data type which is like a regular queue or stack data structure, but where additionally each element has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority. If two elements have the same priority, they are served according to their order in the queue.

###Features

  • Generic
  • Thread-safe using ReaderWriterLockSlim
  • Performant
    • Take max item, Insertion, Removal - O(N log N)
  • Resizable (queue grows and shrinks depending on the number of items)

#NuGet

###Applications

##Skip list Generic concurrent skiplist for .NET

This data structure makes random choices in arranging the entries in such a way that search and update times are O(log N) on average, where N is the number of entries in the list. Interestingly, the notion of average time complexity used here does not depend on the probability distribution of the keys in the input. Instead, it depends on the use of a random-number generator in the implementation of the insertions to help decide where to place the new entry. [Detailed overview] (https://msdn.microsoft.com/en-us/library/ms379573(VS.80).aspx#datastructures20_4_topic4) of skip list and a simple implementation.

###Features

  • Generic
  • Thread-safe using ReaderWriterLockSlim
  • Performant
    • Take min or max item - O(1)
    • Insertion, Removal, Check if contains - O(log N)
    • Enumeration in order - O(N)
  • Additional operations
    • Get Floor and Clealing items - O(log N)
    • Get items in range O(log N + K) (where K is number of items in result)

###Applications

#License Released under the MIT license.

Build Status




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap