Questions tagged [c5]

An open-source .NET generic collection library.

C5 is the abbreviation for "Copenhagen Comprehensive Collection Classes for C#" which is an open-source generic collection library initiated by researchers at the University of Copenhagen (Denmark).

The home page can be found at itu.dk/research/c5 and I can do no better than to quote their own intro.

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".

22 questions
16
votes
6 answers

C# Binary Trees and Dictionaries

I'm struggling with the concept of when to use binary search trees and when to use dictionaries. In my application I did a little experiment which used the C5 library TreeDictionary (which I believe is a red-black binary search tree), and the C#…
Projectile Fish
  • 935
  • 3
  • 9
  • 26
7
votes
1 answer

Is there an interface in C# for interval-scaled values?

I'm making an interval collection extension of the famous C# library C5. The IInterval interface defines an interval with comparable endpoints (irrelevant members removed): public interface IInterval where T : IComparable { T Low { get; } …
Mikkel R. Lund
  • 2,336
  • 1
  • 31
  • 44
7
votes
1 answer

Microsoft Dynamics C5 integration with external system

I am currently on a project integrating Microsoft Dynamics C5 with an external system. ie, when an item is created on Dynamics C5 i want the item to be created in an external system (which has a feature rich API). Can someone give an idea how can we…
Ajmal VH
  • 1,691
  • 1
  • 13
  • 27
4
votes
2 answers

Implementing Hoey Shamos algorithm with C#

Okay, I am now getting the correct information from my current algorithm! However, with 700,000 polygons to check, it's just way too slow! The previous issue is fixed (My Line2D intersectsWith method was incorrect) Now it's a matter of identifying…
Evan Parsons
  • 1,139
  • 20
  • 31
4
votes
1 answer

Small sized collections from C5 Generic Collection Library are comparatively very slow - can anything be done?

I've recently been testing C5 collections in C# and I'm loving their functionality. For large collections the performance seems on par with the generic counterparts. For small collections however they are significantly slower. I suspect the dramatic…
Arbil
  • 999
  • 1
  • 7
  • 15
3
votes
1 answer

.net collection for fast filtering (sorted collection)

When profiling a very slow method, I discovered the lag is on searching and filtering of a collection. The method does the following (in order). According to profiler, 80% of time are spend on step 1-3. Read sorted collection from a file and…
Chi Chan
  • 11,890
  • 9
  • 34
  • 52
2
votes
1 answer

How to use IPriorityQueue in the C5 Library

I am using the popular C5 library for C# (C5) and I'm trying to figure out how to implement the IPriorityQueue properly. Lets say I have the set A={5,4,1,2,3}. I want the priority to be the highest integer value. How do I implement this? Could…
DrOmega
  • 31
  • 1
  • 3
2
votes
2 answers

How does Update work in C5 collection?

How do I use an update method in C5 collection? For example, lets say I have a set where I want to replace item A with B. I'd expect it to be something like: HashSet s = new HashSet(); s.add("A"); s.update("A", "B"); but instead,…
Andriy Drozdyuk
  • 58,435
  • 50
  • 171
  • 272
1
vote
1 answer

C5 Generics Collection IntervalHeap -- getting an IPriorityQueueHandle from a T for Replace or Delete op

I'm using the Generics Collection library C5 (server down :-( ) and I have an IntervalHeap(T) and I need to Delete or Replace a T that is not the Max or Min. How do I get an IPriorityQueueHandle from my T? The C5 library source code shows that…
Jared Updike
  • 7,165
  • 8
  • 46
  • 72
1
vote
0 answers

Redis-like SortedSet in C#

Unlike the SortedSet or SortedDictionary from BCL, The Sorted Sets from Redis is much more powerful. It allows access by member, quite like dictionary Sequence is determined on score, a different field from member and allows same…
Mr.Wang from Next Door
  • 13,670
  • 12
  • 64
  • 97
1
vote
2 answers

Tree Data Structure

I am looking for a tree implementation... you can see the me previous question here. but I won't like to implement it myself, example functionalities needed: I need FindElement(node) I need GetParent(node) - will do the find…
rabashani
  • 1,443
  • 2
  • 14
  • 22
1
vote
2 answers

Data structure for category

I am looking for a data structure to add, remove, get, and find on categories. For example: Books Drama Science fiction Other Sports Cycling Golf Team Sports Soccer Football etc. I think about using tree from the C5 collection library for…
rabashani
  • 1,443
  • 2
  • 14
  • 22
0
votes
1 answer

C5 collection library - serialization problem over WCF

I am trying to send a TreeDictionary from the C5 collection library over WCF. It gets to the recipient OK (I had to add a lot of KnownType attributes for what seems to be internal data structures). However, now I am stuck at a point where it fails…
freddy smith
  • 3,347
  • 5
  • 24
  • 28
0
votes
2 answers

Using C5 Collection Tree Data Structure

I have been struggling for days finding .NET Tree Data Structure, I have read many recomendation using C5 library, but I have yet find example for it. I have read C5 documentation but didn't find example for it (I admit I haven't read all…
Coding Junkies
  • 139
  • 2
  • 11
0
votes
1 answer

Serializable labeled class but not working

I recently wrote a code for copying a class with C5 library "IntervalHeap" but encountered an error message like this. System.Runtime.Serialization.SerializationException: 'Type 'C5.IntervalHeap`1+Interval[[TransSys1.Node, TransSys1, …
Thomas J
  • 35
  • 9
1
2