lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32921] - Some utilities for a compact sparse filter
Date Wed, 05 Jan 2005 18:21:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32921>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32921





------- Additional Comments From paul.elschot@xs4all.nl  2005-01-05 19:21 -------
Created an attachment (id=13901)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=13901&action=view)
JUnit test case for SortedVIntList

The only change needed to SortedVIntList to pass the tests
is the	"+ 1" in the BitSet constructor as Mark noted:

  public SortedVIntList(BitSet bits) {
    initBytes();

    int lastInt = 0;
    int nextInt = bits.nextSetBit(lastInt);
    while (nextInt != -1) {
      add(nextInt, lastInt);
      lastInt = nextInt;
      nextInt = bits.nextSetBit(lastInt + 1); // correction here
    }

    resizeBytes(lastBytePos);
  }

so I'm not attaching the corrected version.

The test code suppresses the test BitSet test for
some special cases: too large integers that cause
too much memory used in the BitSet, and duplicates
in the list of integers that cannot be represented
in a BitSet.

I'll try and not post untested code again :)

Regards, and thanks again Mark,
Paul Elschot


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message