What is a simple C library for a set of integer sets?

Posted by conradlee on Stack Overflow See other posts from Stack Overflow or by conradlee
Published on 2010-03-23T13:58:24Z Indexed on 2010/03/24 16:53 UTC
Read the original article Hit count: 174

Filed under:
|
|

I've got to modify a C program and I need to include a set of unsigned integer sets. That is, I have millions of sets of integers (each of these integer sets contains between 3 and 100 integers), and I need to store these in some structure, lets call it the directory, that can in logarithmic time tell me whether a given integer set already exists in the directory. The only operations that need to be defined on the directory is lookup and insert.

This would be easy in languages with built-in support for useful data structures, but I'm a foreigner to C and looking around on Google did (surprisingly) not answer my question satisfactorily. This project looks about right:

http://uthash.sourceforge.net/

but I would need to come up with my own hash key generator.

This is a standard, simple problem, so I hope there is a standard and simple solution.

© Stack Overflow or respective owner

Related posts about c

    Related posts about set