The C5 Generic Collection Library for C# and CLI

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 [email protected] and [email protected].

时间: 2024-09-30 00:25:10

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

Runtime Complexity of .NET Generic Collection

Runtime Complexity of .NET Generic Collection I had to implement some data structures for my computational geometry class. Deciding whether to implement the data structures myself or using the build-in classes turned out to be a hard decision, as the

学习如何避免10种最常见的C#误区

英文原文:"Learn How to Avoid The 10 Most Common C# Mistakes" About C# C# is one of several languages that target the Microsoft Common Language Runtime (CLR). Languages that target the CLR benefit from features such as cross-language integration and

.Net常见错误

常见错误 #1: 把引用当做值来用,或者反过来 C++ 和其他很多语言的程序员,习惯了给变量赋值的时候,要么赋单纯的值,要么是现有对象的引用.然而,在C# 中,是值还是引用,是由写这个对象的程序员决定的,而不是实例化对象并赋值的程序员决定的.这往往会坑到 C# 的新手程序员. 如果你不知道你正在使用的对象是否是值类型或引用类型,你可能会遇到一些惊喜.例如:   Point point1 = new Point(20, 30);   Point point2 = point1;   point2.

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

关于C# C#是达成微软公共语言运行库(CLR)的少数语言中的一种.达成CLR的语言可以受益于其带来的特性,如跨语言集成.异常处理.安全性增强.部件组合的简易模型以及调试和分析服务.作为现代的CLR语言,C#是应用最为广泛的,其应用场景针对Windows桌面.移动手机以及服务器环境等复杂.专业的开发项目. C#是种面向对象的强类型语言.C#在编译和运行时都有的强类型检查,使在大多数典型的编程错误能够被尽早地发现,而且位置定位相当精准.相比于那些不拘泥类型,在违规操作很久后才报出可追踪到莫名其妙错

(转)C# 程序员易犯的 10 个错误

关于C# C#是针对微软公共语言运行库(CLR)的开发语言之一.针对CLR的开发语言得益于如跨语言集成的性能,异常处理,安全性增强,组件交互的简化模型,调试和分析服务.对于今日的CLR来说,C#是定位到Windows桌面,移动设备或服务器环境中,在处理复杂,专业的开发项目方面使用最广泛的开发语言. C#是面相对象,强类型的语言.C#中严格的类型检查,在编译和运行时,使得典型的编程错误能尽早报告,并且能精准给出错误位置.这能帮助程序员节省很多时间,相比于跟踪那些可以发生在违规操作很长时间之后的令人

Boost 1.61.0 Library Documentation

http://www.boost.org/doc/libs/1_61_0/ Boost 1.61.0 Library Documentation Accumulators Framework for incremental calculation, and collection of statistical accumulators. Author(s): Eric Niebler First Release: 1.36.0 Standard: Categories: Math and nume

scala collection详解

原帖:http://stackoverflow.com/questions/1722137/scala-2-8-collections-design-tutorial There's a 2.8 collection walk-through by Martin Odersky which should probably be your first reference. It has been supplemented as well with architectural notes, whic

Java泛型通配符学习 —— Java Generic&#39;s Wildcards

Java Generic's wildcards is a mechanism in Java Generics aimed at making it possible to cast a collection of a certain class, e.g A, to a collection of a subclass or superclass of A. This text explains how. 理解:Java的泛型通配符机制旨在实现集合的类型转换.例如集合A,转换为A的子类集合或

[转]Dynamics AX and Generic collections of .Net

转自:http://blogs.msdn.com/b/emeadaxsupport/archive/2009/04/23/dynamics-ax-and-generic-collections-of-net.aspx EMEADAXSupport 23 Apr 2009 9:54 AM 3 I'm using Dynamics AX 2009 and want to instantiate the .NET class "System.Collections.Generic.List"