Commit 3486f048 authored by An Ionescu's avatar An Ionescu

Update README.md

parent 511defd0
...@@ -32,11 +32,11 @@ So far the only implementation is the composite "family". Named thusly because t ...@@ -32,11 +32,11 @@ So far the only implementation is the composite "family". Named thusly because t
- ``CompositeMultiBiMap<T, K>``. Uses three dictionaries. One that maps keys to value hashsets, a second that maps value hashsets to keys, and a third dictionary that maps unique values to key hashsets. - ``CompositeMultiBiMap<T, K>``. Uses three dictionaries. One that maps keys to value hashsets, a second that maps value hashsets to keys, and a third dictionary that maps unique values to key hashsets.
## Features & Complexity ## Features & Complexity
| Implementation | Fwd Lookup | Rev Lookup | Add | Remove | ContainsKey | ContainsValue | Space | | Implementation | Forward Lookup | Reverse Lookup | Add | Remove | ContainsKey | ContainsValue | Space |
| ------------------- | -------------- | -------------- | ----------- | ----------- | ----------- | ------------- | ---------------- | | ------------------- | -------------- | -------------- | ----------- | ----------- | ----------- | ------------- | ---------------- |
| CompositeBiMap | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(2\*k + vu) | | CompositeBiMap | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(2\*k+vu) |
| CompositeMultiMap | O(1)/O(n) | N/A | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(k)/O(k^2) | O(k + v) | | CompositeMultiMap | O(1)/O(n) | N/A | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(k)/O(k^2) | O(k+v) |
| CompositeMultiBiMap | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(3\*k + v + vu) | | CompositeMultiBiMap | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(1)/O(n) | O(3\*k+v+vu) |
Note: values to the left of the slash indicate the "average" case, generally signifying the absence of hash collisions. The value to the right indicates the actual worst case time complexity. Note: values to the left of the slash indicate the "average" case, generally signifying the absence of hash collisions. The value to the right indicates the actual worst case time complexity.
- n => generic item count. - n => generic item count.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment