The C5 Generic Collection Library
for C# and CLI

https://github.com/sestoft/C5/

The C5 Generic Collection Library

C5 is a library of generic collection classes for C# and other CLI languages and works with Microsoft .Net version 2.0 and later, and Mono version 2 and later.

C5 provides functionality and data structures not provided by the standard .Net System.Collections.Generic namespace, such as persistent tree data structures, heap based priority queues, hash indexed array lists and linked lists, and events on collection changes. Also, it is more comprehensive than collection class libraries on other similar platforms, such as Java. Unlike many other collection class libraries, C5 is designed with a strict policy of supporting "code to interface not implementation".

News

  • 25 May 2011: Version 2.0.0 released at Github and NuGet. This version has been updated to fit the new features of C# 3.0 and C# 4.0 and to be portable to WP7, Silverlight, Xbox and Mono. It is not backwards compatible because eg. C5.Fun<R> has been replaced with System.Func<R> and so on. There is a document describing the changes and rationale. Thanks to Rasmus Nielsen at the IT University for the good work and to many users, not least Marcus Griep, for suggestions and contributions.
  • 17 December 2010: Version 1.1.1 released. Fixes the five bugs found since February 2008. See Release Notes 1.1.1.
  • 10 February 2008: Version 1.1.0 released. Adds implementation of some .NET Framework class library interfaces and fixes the six bugs found since June 2007. See Release Notes 1.1. The book about C5 has been updated also.
  • 8 January 2008: A video with an interview about C5 at MSDN Channel 9 (45 minutes).
  • 1 July 2007: Here's an article in Dr Dobb's Journal.
  • 30 May 2007: Version 1.0.2 released. It fixes the three bugs found since June 2006. See Release Notes 1.0.2.
  • 27 June 2006: Version 1.0.1 released. All known bugs (six) have been fixed, two feature requests accommodated, and the book has been updated. See Release Notes 1.0.1.
  • 30 January 2006: Version 1.0 released.

Downloads and resources

Functionality

The C5 collection library provides the following collection concepts, described by C# interfaces: Directed enumerable, collection value, directed collection value, extensible collection, collection, sequenced collection, indexed collection, sorted collection, indexed sorted collection, persistent sorted collection, list, LIFO stack, FIFO queue, priority queue, dictionary, and sorted dictionary.

The C5 collection library provides the following data structures, described by C# classes: array list, doubly linked list, hash-indexed array list, hash-indexed linked list, hash set, hash bag (multiset), sorted array, wrapped array, tree set, tree bag (multiset), stack, double-ended queue, circular queue, priority queue (interval heap), hash dictionary, and tree dictionary.

See the relation between interfaces and classes for collections and for dictionaries.

The C5 collection library provides the following unusual functionality on collections and dictionaries: collection update events, multiple updatable list views, reversible enumeration, hash indexes on lists, snapshottable tree-based collections, priority queues with item handles, and in general a design with emphasis on orthogonality, flexibility, and preservation of invariants.

Authors, license and credits

The library is Copyright 2003-2006 Niels Kokholm and Peter Sestoft and is released under an MIT-style open license (similar to a BSD-style license).

It is based on the GCollections library created by Peter Sestoft during his visit to Microsoft Research, Cambridge in 2001. Niels Kokholm extended the library as a Master's thesis project at the IT University of Copenhagen, advised by Peter Sestoft. Subsequent completion of the library was financed in part by a grant from Microsoft Research University Relations.

Bug reports, feedback and suggestions are welcome at niels.kokholm@edlund.dk and sestoft@itu.dk.

The C5 Generic Collection Library for C# and CLI的更多相关文章

  1. Runtime Complexity of .NET Generic Collection

    Runtime Complexity of .NET Generic Collection   I had to implement some data structures for my compu ...

  2. .Net常见错误

    常见错误 #1: 把引用当做值来用,或者反过来 C++ 和其他很多语言的程序员,习惯了给变量赋值的时候,要么赋单纯的值,要么是现有对象的引用.然而,在C# 中,是值还是引用,是由写这个对象的程序员决定 ...

  3. C# 程序员最常犯的 10 个错误

    关于C# C#是达成微软公共语言运行库(CLR)的少数语言中的一种.达成CLR的语言可以受益于其带来的特性,如跨语言集成.异常处理.安全性增强.部件组合的简易模型以及调试和分析服务.作为现代的CLR语 ...

  4. C# 程序员最常犯的 10 个错误(转)

    关于C#关于本文常见错误 #1:把引用当做值来用,或者反过来常见错误 #2:误会未初始化变量的默认值常见错误 #3:使用不恰当或未指定的方法比较字符串常见错误 #4:使用迭代式 (而不是声明式)的语句 ...

  5. C# 程序员最常犯的 10 个错误http://www.oschina.net/translate/top-10-mistakes-that-c-sharp-programmers-make

    来源:http://www.oschina.net/translate/top-10-mistakes-that-c-sharp-programmers-make 关于C# C#是达成微软公共语言运行 ...

  6. Boost 1.61.0 Library Documentation

    http://www.boost.org/doc/libs/1_61_0/ Boost 1.61.0 Library Documentation Accumulators Framework for ...

  7. Generic Interfaces (C# Programming Guide)

    https://msdn.microsoft.com/en-us/library/kwtft8ak(v=vs.140).aspx It is often useful to define interf ...

  8. [转]Dynamics AX and Generic collections of .Net

    转自:http://blogs.msdn.com/b/emeadaxsupport/archive/2009/04/23/dynamics-ax-and-generic-collections-of- ...

  9. C# Collection

    数组与集合不同的适用范围: 数组:数组最适用于创建和使用固定数量的强类型化对象. 集合:集合提供更灵活的方式来使用对象组. 与数组不同,你使用的对象组随着应用程序更改的需要动态地放大和缩小. 对于某些 ...

随机推荐

  1. UVa 884 - Factorial Factors

    题目:输出n!中素数因数的个数. 分析:数论.这里使用欧拉筛法计算素数,在计算过程中求解就可以. 传统筛法是利用每一个素数,筛掉自己的整数倍: 欧拉筛法是利用当前计算出的全部素数,乘以当前数字筛数: ...

  2. Quartz时间配置

    格式: [秒] [分] [小时] [日] [月] [周] [年]  序号 说明  是否必填  允许填写的值 允许的通配符  1  秒  是  0-59    , - * /  2  分  是  0-5 ...

  3. [置顶] LLVM每日谈之十五 LLVM自带的examples

    作者:snsn1984 在LLVM源码的目录下,有一个目录叫做examples,这个目录下边有几个LLVM的例子,初学者一般不会太关注这些例子,但是这些例子确实是精华中的精华,在LLVM的学习过程中不 ...

  4. 哈希表之bkdrhash算法解析及扩展

    BKDRHASH是一种字符哈希算法,像BKDRHash,APHash.DJBHash,JSHash,RSHash.SDBMHash.PJWHash.ELFHash等等,这些都是比較经典的,通过http ...

  5. 辛星一起了解下后续PHP性能功能

    关于第一个发言,这篇文章是我的原创.但,这些数据不被总结出来我,你可以搜索下"百度project师HDK",这些数据提供了他,我只是给一个总结.因为他很长的文章,我在这里提炼几点. ...

  6. TP-LINK telnet远程 重启路由器(转)

    突然断网,以前房东的路由器管理页面可以打开,今天突然间就打不开了.ping了下,可以ping通,于是就想起了房东的路由器是TP-LINK的 可以 telnet登陆的.每次,断网,我都会重启房东的路由器 ...

  7. Objective C (iOS) for Qt C++ Developers(iOS开发,Qt开发人员需要了解什么?)

    Qt/C++开发人员眼中的Obj-C      对于我们第一次自己定义iOS应用来说,对于来自Qt/C++开发人员来说,我不得不学习Objective-C相关语法与知识 为了让读者可以更easy理解这 ...

  8. Mahout推荐算法ItemBased

    Mahout推荐的ItemBased 一.   算法原理 (一)    基本的 下面的例子,参见图评分矩阵:表现user,归类为item. 图(1) 该算法的原理: 1.  计算Item之间的相似度. ...

  9. 当用户登录,经常会有实时的下拉框,例如,输入邮箱,将会@qq.com,@163.com,@sohu.com

    如图所示, 码,如以下:<input id="user_sn" class="loginInput" name="user_sn" t ...

  10. linux根据该文件夹的读取权限和权限运行差异

    假设你linux下使用ls.细心的你会发现居然夹有权限运行.例如: drwxrwxr-x 11 cl cl 4096  9 25 14:22 ./ drwxr-xr-x 49 cl cl 4096 1 ...