sourcesmith / compressedbitset Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/compressedbitset
Automatically exported from code.google.com/p/compressedbitset
To reproduce this bug, run this simple test case . . .
import junit.framework.TestCase;
import org.devbrat.util.WAHBitSet;
public class WahBitSetTest extends TestCase {
public void testIt() {
int maxSize = 10000;
int bitsToSet = 100;
WAHBitSet allOnes = new WAHBitSet();
for (int i = 0; i < maxSize; i++) {
allOnes.set(i);
}
WAHBitSet partialOnes = new WAHBitSet();
for (int j = maxSize - bitsToSet; j < maxSize; j++) {
partialOnes.set(j);
}
assertEquals(maxSize - (maxSize - bitsToSet), allOnes.andSize(partialOnes));
}
}
The expected result of the andSize() call should be 100, but it is 38. If you
play around with the numbers, this will start working again when you set the
bitsToSet variable to 69 (i.e., it breaks at 70, but works fine at 69 and
lower.)
I realize that this project is mostly dormant, but any thoughts from the author
or other users would be appreciated. This is a major bug.
Original issue reported on code.google.com by [email protected]
on 24 Jul 2010 at 1:34
Hi,
Recently, I have tried to run your project in eclipse. However, eclipse
complains about methods from the IntArrayList. For example, you call int v
= vec.get(idx); (line 929) in WAHBitSet.java. The variable v expects the
get method to return an int type. But, in the IntArrayList class provided,
the method get returns an Object. Only getQuick() in IntArrayList returns
an int type. Are you using a different IntArrayList class? If so, where can
I get this class?
Thanks,
Cong,
Original issue reported on code.google.com by [email protected]
on 9 Jul 2009 at 5:32
Some operations can be done with both uncompressed and compressed bitsets.
I plan to add those operations.
Original issue reported on code.google.com by [email protected]
on 30 Nov 2007 at 9:56
Now the code throws an exception if you set a bit inside the compressed
bitmap. That should be removed.
Original issue reported on code.google.com by [email protected]
on 30 Nov 2007 at 9:55
What steps will reproduce the problem?
1. create a compressed bitset
2. try to iterate over it using the WAHIterator
What version of the product are you using? On what operating system?
0.1
Please provide any additional information below.
WAHIterator.next() calls nextDoc and an ArrayIndexOutOfBoundsException gets
thrown at pos[pos_idx++];
Apparently pos has length 0, pos_idx is 0. The current word is marked as
being a non-range word, but it doesn't contain any indices?
Original issue reported on code.google.com by [email protected]
on 1 Apr 2010 at 10:52
Please add methods to serialize the bitset to an array of bytes or ints,
this way one can initialize the bitmap from a byte or int array
Thanks
Original issue reported on code.google.com by [email protected]
on 28 Jan 2008 at 2:57
I'm thinking about exporting this project to github, or you guys don't want to.
:) I don't want it to seem like I'm the author of the project, though, so I'll
wait.
Original issue reported on code.google.com by [email protected]
on 20 Jun 2015 at 10:18
Currently it seems that API allow only a explicitly setting a bit position
value to 1. But there are occasions that this value has to be explicitly
set to zero and flip a one to zero.
Original issue reported on code.google.com by [email protected]
on 23 Dec 2009 at 4:24
What steps will reproduce the problem?
import org.devbrat.util.WAHBitSet;
import junit.framework.TestCase;
public class TestAnd extends TestCase {
public void testAnd() throws Exception {
int[] s1 = new int[] { 99, 185, 240, 250, 265, 283, 312, 457, 488, 516,
673, 775, 809, 954, 974 };
int[] s2 = new int[] { 97, 160, 230, 237, 253, 254, 298, 309, 330, 358,
383, 443, 481, 523, 589, 607, 748, 775, 941, 947 };
WAHBitSet bs1 = fromInts(s1);
WAHBitSet bs2 = fromInts(s2);
WAHBitSet and = bs1.and(bs2);
// should be 775, but get 868
assertEquals(775, and.iterator().next());
}
private WAHBitSet fromInts(int[] ints) {
WAHBitSet bitSet = new WAHBitSet();
for (int i : ints) {
bitSet.set(i);
}
return bitSet;
}
}
What version of the product are you using? On what operating system?
v0.1, windows xp sp3, jdk 6 update 6
Original issue reported on code.google.com by [email protected]
on 3 Aug 2008 at 7:55
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.