Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-607

Adding a hash table based BidiMap

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • BidiMap

    Description

      In the class Javadoc of http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bidimap/DualHashBidiMap.java?view=markup
      there is a mention that Collections would welcome a direct hash-based implementation of BidiMap interface.

      I am working on such; my source is available at https://github.com/coderodde/BidirectionalHashMap

      At this point it does not adhere to style/interfaces of Commons Collections (such as implementing the BidiMap interface), yet I believe that is a matter of simple rewrite.

      Currently, it represents the "collision chains" as AVL-trees, thus guaranteeing O(log n) access/modification even on poor hash functions. If that is not required, rewriting would be trivial as well.

      I have several questions, but I have to start from the most important: is there any acute need for such a data structure?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              coderodde Rodion Efremov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 336h
                  336h
                  Remaining:
                  Remaining Estimate - 334h 40m
                  334h 40m
                  Logged:
                  Remaining Estimate - 334h 40m
                  1h 20m