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

BloomFilter: Add tests using or, and and xor with different length filters.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Done
    • 4.5.0-M1
    • 4.5.0-M1
    • Collection

    Description

      Add tests to SetOperationsTest.java to verify correct cardinaly results when different length index filters are used.

      tests should be for orCardinality(), andCardinality(), xorCardinality(),

      aherbert on 27 Feb

      This was the previous test using different length filters:

              Shape shape2 = Shape.fromKM(3, 192);
              filter1 = new SparseBloomFilter(shape2, IndexProducer.fromIntArray(new int[] { 1, 63, 185}));
              filter2 = new SparseBloomFilter(shape, IndexProducer.fromIntArray(new int[] { 5, 64, 69 }));
              assertEquals(6, SetOperations.orCardinality(filter1, filter2));
              assertEquals(6, SetOperations.orCardinality(filter2, filter1));
      

      Others should be added for and and xor.

      Attachments

        Issue Links

          Activity

            People

              claude Claude Warren
              claude Claude Warren
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: