commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Efremov, Rodion" <rodion.efre...@helsinki.fi>
Subject [collections]
Date Mon, 03 Jul 2017 19:19:00 GMT
Good day!


I am working on a bidirectional (bijective) hash map at https://github.com/coderodde/BidirectionalHashMap


In http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bidimap/DualHashBidiMap.java?view=markup
there is a note in the Javadoc that Collections would like to have a directed hash table based
BidiMaps.


My current implementation combines both tree and hash table approach: all "collision chains"
are actually AVL-tree based "collision trees" so that even if hashing is really poor (or even
constant), access/modification of data is no worse than O(log n). Also, I maintain an internal
iteration list (like LinkedHashMap) that allows faster iteration and faster of relinking of
nodes to new hash tables when expanding the hash tables.


Could someone take a look at my current source and tell me how that fits/doesn't fit into
Collections?


Best regards,

Rodion E.

[https://avatars2.githubusercontent.com/u/1770505?v=3&s=400]<https://github.com/coderodde/BidirectionalHashMap>

coderodde/BidirectionalHashMap<https://github.com/coderodde/BidirectionalHashMap>
github.com
BidirectionalHashMap - My implementation of a bidirectional bijective hash map in Java



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message