Implement previousValue on EliasFanoReader
authorGiuseppe Ottaviano <ott@fb.com>
Mon, 15 Jun 2015 22:52:25 +0000 (15:52 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 16 Jun 2015 03:24:05 +0000 (20:24 -0700)
commitc1f059de5f64b962bcb08f31dd4d7032fce79757
tree4c02ed74196a261b3b5c6cdeebe2d5d5943b32a4
parent31c71948e3b4b791ee462355151528a3d15ea7d2
Implement previousValue on EliasFanoReader

Summary: It is often useful to retrieve the value preceding the current value
in an Elias-Fano iterator, for example when the list represents
adjacent ranges. This diff implements a new method `previousValue` in
`EliasFanoReader`.

It also adds a new `kUnchecked` boolean template argument to
`EliasFanoReader` which skips bounds checking.

Reviewed By: @philippv

Differential Revision: D2155049
folly/experimental/EliasFanoCoding.h
folly/experimental/test/CodingTestUtils.h