Commit graph

245 commits

Author SHA1 Message Date
Matthew Jaffee
d04530a5c0
make container struct description more accurate 2018-03-03 11:45:48 -06:00
Todd Gruben
2d458b98a1 merge conflicts 2018-02-20 10:41:02 -06:00
Travis Turner
685a0075ae
add evenBits/oddBits container tests and related bug fix 2018-02-15 10:20:54 -06:00
Travis Turner
911af238ff
clean up roaring container helper functions 2018-02-14 15:06:53 -06:00
Travis Turner
673232baf9
bug fixes found by running container operation tests 2018-02-14 13:30:38 -06:00
Travis Turner
6529866b57
templates for testing various container operations 2018-02-14 13:30:07 -06:00
Travis Turner
944a0b5b3d
fixes a shift logic bug in bitmapZeroRange that was causing an overflow-like condition 2018-02-12 15:23:00 -06:00
Travis Turner
ac4010bce0
avoid overflow bug in differenceRunArray which was appending a full run to the container 2018-02-09 11:35:13 -06:00
Matthew Jaffee
cc8733eedb
fix bug where a count query and bitmap query could return different numbers
There was a case where the Bitmap iterator logic could skip over a bit in a run
container if 1. the run container was not the first container in the bitmap, and
2. The first run in the run container had only one bit.

The bug was due to how the iterator was initialized with iterator.Seek(0) which
sets up the initial values of itr.i,j,k based on the type of the first
container. It was failing to set itr.k to -1 unless the first container was an
RLE container. itr.k is only used by RLE containers in the iterator, and must be
set to -1 when an RLE container is encountered. When Iterator.Next() encountered
the run container and itr.k was set to 0, it checked to see if itr.k <= run.last
- run.first, and if so it assumes that it was finished with the run and moved to
the next one. run.last - run.first is 0 in the case of a single bit run, so that
bit was skipped. After this, itr.k is set to -1 and all further iteration
proceeds as expected.
2018-02-06 10:26:17 -06:00
Todd Gruben
8547f1a2a9 gofmted 2017-12-21 15:30:31 -06:00
Todd Gruben
89714c706d added binary search to runAdd 2017-12-21 15:12:35 -06:00
tgruben
93102a94ae
Merge pull request #1020 from tgruben/vetfix
RIP container_type
2017-12-19 16:11:12 -06:00
tgruben
63a3df1634
Merge pull request #1017 from tgruben/container-bench
added benchmark for various container usage patterns
2017-12-19 13:07:23 -06:00
Todd Gruben
065c82f737 passed deadcode check 2017-12-19 11:30:17 -06:00
Todd Gruben
cd4a30e671 unconvert warnings corrected 2017-12-19 11:18:46 -06:00
Todd Gruben
136dc4ca2e finished govet issues 2017-12-19 10:49:00 -06:00
Todd Gruben
1dbe64da3c made sure Linear and Reverse delt with same bits 2017-12-19 10:45:27 -06:00
Todd Gruben
449b63783d merge error check 2017-12-19 10:36:28 -06:00
Todd Gruben
28d590c575 cleaned up some golint warnings 2017-12-19 10:32:39 -06:00
Todd Gruben
d0d6d3d6b6 added benchmarks for runs for intersect count 2017-12-19 07:52:53 -06:00
Todd Gruben
4ceaed5316 missed one 2017-12-19 07:21:24 -06:00
Todd Gruben
0f3d26bd30 addressed jaffee suggestions; tweaked parameters 2017-12-19 07:15:40 -06:00
Todd Gruben
ccf57e23cd removed overlap calc 2017-12-18 15:33:22 -06:00
Todd Gruben
89a42c7fe2 corrected offset value 2017-12-18 15:18:54 -06:00
Todd Gruben
a2195396ca fixed varible overwrite 2017-12-18 15:01:52 -06:00
Todd Gruben
155472b3db added benchmark for various container usage patterns 2017-12-18 14:01:11 -06:00
Todd Gruben
6bec75fc31 applied travis suggestions 2017-12-15 09:08:53 -06:00
Todd Gruben
e2064f52b1 added error checking to WriteTo 2017-12-13 15:08:03 -06:00
Matthew Jaffee
4785b0e793
add container types to other tests (though they were passing already) 2017-12-08 09:56:44 -06:00
Matthew Jaffee
907aa3495f
add container types and set c.n to get tests working 2017-12-08 09:54:24 -06:00
Matthew Jaffee
489b7a59c4
protect against accessing pointers to memory which was unmapped 2017-12-08 09:53:54 -06:00
Todd Gruben
c9c2a2b0d8 added test for differenceRunBitmap overflow bug 2017-11-11 09:44:15 -06:00
Todd Gruben
450dda7fd0 overflow bug in differenceRunBitmap Part 2 2017-11-10 17:01:25 -06:00
Todd Gruben
50d31a3c83 fix overflow in differenceRunBitmap 2017-11-10 12:44:25 -06:00
Travis Turner
681527e37a Merge pull request #859 from travisturner/refactor-differencerunarray
Refactor differencerunarray
2017-09-28 10:31:16 -05:00
Travis
40b27b6643
Fix panic when iterating over an empty run container.
When the difference of two run containers resulted in an empty
container, that container would be a run container with no runs.
The Iterator was expected there to be at least on run in
`container.runs`. This fix protects against that and adds tests
for that case.
2017-09-27 15:11:16 -05:00
Matthew Jaffee
f115249316
don't forget to calculate in in differenceArrayRun 2017-09-27 15:05:27 -05:00
Matthew Jaffee
fd73eaa5cb
re-implement differenceRunArray to not use iterator
hopefully less heap allocs and better perf now
2017-09-27 15:05:16 -05:00
Travis
c7e672e16f
cleaning up a few of the tests 2017-09-27 11:23:00 -05:00
Todd Gruben
de2f16b617
optimzed differenceRunBitmap 2017-09-27 11:23:00 -05:00
Todd Gruben
3f3cc60531
micro optimization to bitmap difference 2017-09-27 11:17:15 -05:00
Todd Gruben
50dab75c82
optimize unionArrayBitmap 2017-09-27 11:17:15 -05:00
Todd Gruben
48f34836e5
optimize differenceBitmapArray 2017-09-27 11:17:15 -05:00
Todd Gruben
08133368e3
optimize differenceArrayBitmap 2017-09-27 11:17:15 -05:00
Todd Gruben
71b7216c51
fix to to allocate properly for difference test 2017-09-27 11:17:15 -05:00
Todd Gruben
4487e6aadd
optimized differenceBitmapBitmap 2017-09-27 11:17:15 -05:00
Matthew Jaffee
de6a25cb8d
rewrite intersectArrayBitmap for perf 2017-09-27 11:17:15 -05:00
Todd Gruben
1736a40b74
check for array conversion to intersectbitmapbitmap 2017-09-27 11:17:14 -05:00
Todd Gruben
1db1ce63b7
optimize intersectionBitmapBitmap 2017-09-27 11:17:14 -05:00
Travis
0d4f634dd8
implement container.flipBitmap() to improve differenceRunBitmap() 2017-09-25 15:48:40 -05:00