offbrand
A collection of generic, reference counted datastructures in C for C
 All Classes Files Functions Variables Typedefs Macros Groups
Files
obmap

Container class that stores an Offbrand compatible class instance using another Offbrand compatible class instance as a key. More...

Files

file  obmap.h
 obmap Public Interface
 
file  obmap_private.h
 obmap Private Interface
 
file  obmap.c
 obmap Method Implementation
 
file  obmap_test.c
 obmap Unit Tests
 

Detailed Description

Container class that stores an Offbrand compatible class instance using another Offbrand compatible class instance as a key.

An obmap uses key-value based storage to provide constant lookup and insertion times. Maps need not contain instances of only one class and should handle any collection of classes used as both keys and values. The obmap class uses an open addressing collision handling mechanism, which is responsible for a lesser memory overhead compared to separate chaining at the expense of acceptable load factor and O(n) key removal