Commit graph

693 commits

Author SHA1 Message Date
Matthew Jaffee
fab493c42b
fix up missed conflict 2018-02-07 13:56:57 -06:00
Matthew Jaffee
5314d61086
Revert "remove interface"
This reverts commit 343e810bc65562d10d9408c941e65414c6945d9f.
2018-02-07 13:56:57 -06:00
Matthew Jaffee
be4696ebb9
remove interface 2018-02-07 13:56:56 -06:00
Matthew Jaffee
d798963798
fix a bunch of bugs and add some tests 2018-02-07 13:56:56 -06:00
Matthew Jaffee
bc6fb2627f
add initial skip list Containers impl 2018-02-07 13:56:56 -06:00
Matthew Jaffee
cce3379abf
add Containers interface and modify Bitmap to use it
there are no implementations of Containers, so everything is broken, but the
code compiles
2018-02-07 13:56:56 -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
Todd Gruben
641519acf2 cleanup on unmarshall shrink 2017-09-15 22:10:48 -05:00
Todd Gruben
1eb2f8d568 reusing containers for memory efficiency 2017-09-07 12:59:09 -05:00