Duarte Nunes
d7ae25c572
range: Make transform template arguments deductable
...
This patch makes it so that the template arguments of
range<T>::transform are more easily deducible by the compiler.
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
2016-07-18 23:58:31 +00:00
Duarte Nunes
9792a77266
range: Add deoverlap function
...
This patch adds the deoverlap function to range.hh, which takes in a
vector of possibly overlapping ranges and returns a vector of
non-overlapping ranges covering the same values.
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
2016-07-14 18:20:41 +02:00
Pekka Enberg
38a54df863
Fix pre-ScyllaDB copyright statements
...
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".
Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com >
2016-04-08 08:12:47 +03:00
Gleb Natapov
775cc93880
remove unused range and token serializers
2016-02-02 12:15:49 +02:00
Tomasz Grabiec
945ae5d1ea
Move std::hash<range<T>> definition to range.hh
...
Message-Id: <1454008052-5152-1-git-send-email-tgrabiec@scylladb.com >
2016-01-31 20:11:30 +02:00
Gleb Natapov
4384c7fe85
un-nest range::bound class.
...
Serializer does not support nested classes yet, so move bound outside.
2016-01-24 12:45:41 +02:00
Tomasz Grabiec
eb27fb1f6b
range: Introduce equal()
2015-12-16 13:09:01 +01:00
Tomasz Grabiec
488528d1cd
range: Fix range::subtract() for some cases
...
Was not handling wrap-around cases like this properly:
(8, 3) - (2, 1)
2015-11-09 14:20:31 +02:00
Tomasz Grabiec
0f2727b183
range: Implement subtract()
2015-11-09 08:42:45 +08:00
Tomasz Grabiec
48c7f51966
range: Extract bound comparators
2015-11-09 08:42:42 +08:00
Tomasz Grabiec
f37512d1f7
range: Make unwrap() return ranges in-order
2015-11-09 08:42:39 +08:00
Raphael S. Carvalho
93c1035f6e
range: add comment explaining !start and !end in lambda
...
Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com >
2015-10-20 17:23:35 +03:00
Raphael S. Carvalho
c3a9d342f4
range: rename overlap to overlaps
...
overlaps() is more grammatical.
Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com >
2015-10-20 17:23:35 +03:00
Raphael S. Carvalho
24f9c2f85e
range: add method to check if two ranges overlap
...
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com >
2015-10-15 19:29:54 -03:00
Tomasz Grabiec
11eb9a6260
range: Fix range::contains()
...
A range open-ended on both sides should contain all wrapping ranges.
Spotted by Avi.
2015-10-13 12:14:54 +03:00
Tomasz Grabiec
a383f91b68
range: Implement range::contains() which takes another range
2015-10-13 15:44:36 +08:00
Avi Kivity
d5cf0fb2b1
Add license notices
2015-09-20 10:43:39 +03:00
Tomasz Grabiec
e0d81351fe
range: Introduce split_after()
2015-09-09 10:08:24 +02:00
Avi Kivity
98ec451d6a
Extract range<> into its own header
...
It's not just for queries any more.
2015-08-02 16:07:42 +03:00