Alan Bernstein
bff12f5ce1
Add implementations and minimal tests for bitmap-run conversions
2017-06-19 10:18:03 -05:00
Matt Jaffee
ac5f776db9
optimize roaring on snapshot
2017-06-19 10:16:01 -05:00
Matt Jaffee
1a8780c4a2
add bitmapCountRuns and arrayCountRuns
2017-06-19 10:16:01 -05:00
Alan Bernstein
dbee584866
Fixes and tests for array-run conversions
2017-06-19 10:16:01 -05:00
Matt Jaffee
23ce2cd394
unionBitmapRun, bitmapSet/ZeroRange, special case optimization for RLE
2017-06-19 10:13:02 -05:00
Alan Bernstein
22393014cd
Implement run/array conversion functions
2017-06-19 10:13:02 -05:00
Matt Jaffee
32c3b2ad52
more cardinality and conversions
2017-06-19 10:13:02 -05:00
Matt Jaffee
487a369c6d
more cardinality tracking and tests
2017-06-19 10:13:02 -05:00
Matt Jaffee
88e0e4d5b6
cleanup - setting cardinality and conversions
2017-06-19 10:13:02 -05:00
Matt Jaffee
c17c737264
be smarter about setting output.n
2017-06-19 10:13:02 -05:00
Matt Jaffee
8ec8fc556c
intersectRunRun to use runAppendInterval
...
this avoid situations where two runs which are adjacent don't get collapsed to a
single run
2017-06-19 10:13:02 -05:00
Matt Jaffee
97346baa94
unionArrayRun implementation
2017-06-19 10:13:02 -05:00
Matt Jaffee
c5a0f23257
clean up unionRunRun
2017-06-19 10:13:02 -05:00
Matt Jaffee
4848a99aca
unionRunRun working - messy
2017-06-19 10:13:02 -05:00
Matt Jaffee
24c03f07f6
add note to improve intersectRunRun func
2017-06-19 10:13:02 -05:00
Matt Jaffee
cf445f8012
stub out the rest of the rle methods
2017-06-19 10:13:02 -05:00
Matt Jaffee
9781a4c78b
fix tests, prep for union rle implementations
2017-06-19 10:13:02 -05:00
Matt Jaffee
250e8f6f5b
implement intersectBitmapRun
...
wowza
2017-06-19 10:13:02 -05:00
Matt Jaffee
3e8030aee4
implement intersectRunRun
2017-06-19 10:10:57 -05:00
Matt Jaffee
0c3f61a426
implement intersectArrayRun
2017-06-19 10:10:57 -05:00
Matt Jaffee
20cec1363b
implement intersectionCounts for run containers
2017-06-19 10:10:57 -05:00
Matt Jaffee
014005b5d5
when choosing between container types, keep bitmap as default
2017-06-19 10:06:11 -05:00
Matt Jaffee
95b55ee7db
use uint32 instead of uint16 for rle containers
...
stays consistent with the array type containers. array and rle are using uint32
in case we want to change the size of roaring containers as an optimization.
This has been done in the past
a8feb985e1
The downside is that more storage is used, so we may want to convert to uint16
until we decide to play with that optimization again, but for now I'll keep the
rle implementation in sync with the array implementation.
2017-06-19 10:06:11 -05:00
Matt Jaffee
98c8fd1ded
rename conversion funcs to prepare for rle
...
also support rle in clone()
2017-06-19 10:06:11 -05:00
Matt Jaffee
e80812cb0a
implement runMax
2017-06-19 10:06:11 -05:00
Matt Jaffee
72b6eb45e5
add runRemove
2017-06-19 10:06:11 -05:00
Matt Jaffee
c2203d19c1
wip on adding RLE to roaring, add, countRange, contains
2017-06-19 10:03:55 -05:00
Matthew Jaffee
fa4234b04c
Merge pull request #590 from jaffee/set-n-at-end
...
set n based on array length instead of incrementing repeatedly
2017-06-01 11:03:35 -05:00
Todd Gruben
542d748baf
corrected tests to no longer use String method
2017-06-01 10:17:49 -05:00
Todd Gruben
ba2b8cd5b1
removed String method upon discovery of %v
2017-06-01 10:03:23 -05:00
Travis
879e02de81
fix misspelling and run gofmt
2017-05-31 16:22:43 -05:00
Todd Gruben
f584400330
attempt to conquer weird
2017-05-31 16:10:48 -05:00
Todd Gruben
e12fdb69a1
better String()
2017-05-31 15:04:33 -05:00
Todd Gruben
7382428f38
clensed String method;added documentation for tests
2017-05-31 15:01:48 -05:00
Todd Gruben
649e58253a
corrected flip prefix;changed flip to inclusive
2017-05-31 13:58:54 -05:00
Todd Gruben
a6975192d6
Merge branch 'flip' of github.com:tgruben/pilosa into flip
2017-05-31 10:55:31 -05:00
Todd Gruben
aa13bbb6ce
cleaned up comments
2017-05-31 10:40:52 -05:00
tgruben
a58206bb4d
Merge branch 'master' into flip
2017-05-31 08:43:50 -05:00
tgruben
8c5c48bba9
Merge pull request #571 from tgruben/xor
...
added xor support to roaring
2017-05-31 08:34:58 -05:00
Matt Jaffee
56ba127210
set n based on array length instead of incrementing repeatedly
2017-05-30 16:09:02 -05:00
Todd Gruben
b5bd8433cc
added empty and equivlence testing
2017-05-30 13:27:11 -05:00
Todd Gruben
7090ee4d7a
@jaffee cleanup
2017-05-30 12:39:23 -05:00
Todd Gruben
498045f25a
added copy optimization ; type check; and code cleanup
2017-05-30 11:18:05 -05:00
Todd Gruben
aa713e3832
add support for bit flip (negate) in roaring
2017-05-25 10:07:29 -05:00
Matt Jaffee
da961be614
rewrite intersectCountArrayBitmap for perf test
2017-05-24 12:38:50 -05:00
Todd Gruben
2182534cc7
added xor support to roaring
2017-05-22 16:51:53 -05:00
Matt Jaffee
e90e1455db
remove branch and always count last container
2017-05-22 10:38:40 -05:00
Matt Jaffee
a5918d01d9
fix offset check to make sense
2017-05-19 17:09:22 -05:00
Matt Jaffee
c0ddbe0e3f
fix bitmapCountRange and test
...
had been thinking that index 0 was the most significant bit, but based on the
bitmapAdd function, it must be the least significant bit
2017-05-19 15:18:07 -05:00
Matt Jaffee
fb4651cdb8
fix 3 separate bugs in bitmapCountRange
...
in order of the diff:
1. When the start and end of the range fall in the same word, special handling
is needed to "mask" off the beginning and end of the word simultaneously to
avoid counting bits at the beginning or end of the word that aren't in the
range.
2. `i++` is needed at the end of the first partial word to avoid counting this
word in the next block.
3. the shift amount for right shifts is 64 - (end % 64) rather than just end
% 64. If end is (e.g.) 68, then 68 - 64 is 4 and we are only interested in the
first 4 bits of the word, so we must right shift by 60 bits, not 4 bits.
2017-05-18 12:04:37 -05:00