Commit de802f8e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 941dbd45
...@@ -45,13 +45,12 @@ type RangedKeySet struct { ...@@ -45,13 +45,12 @@ type RangedKeySet struct {
} }
///* XXX temp - reenable
// Has returns whether key k belongs to the range. // Has returns whether key k belongs to the range.
func (r *KeyRange) Has(k Key) bool { func (r *KeyRange) Has(k Key) bool {
return (r.lo <= k && k <= r.hi_) return (r.lo <= k && k <= r.hi_)
} }
// Add adds key k to the set. // Add adds key k to the set.
func (S *RangedKeySet) Add(k Key) { func (S *RangedKeySet) Add(k Key) {
S.AddRange(KeyRange{lo: k, hi_: k}) S.AddRange(KeyRange{lo: k, hi_: k})
...@@ -67,8 +66,6 @@ func (S *RangedKeySet) Has(k Key) bool { ...@@ -67,8 +66,6 @@ func (S *RangedKeySet) Has(k Key) bool {
return S.HasRange(KeyRange{lo: k, hi_: k}) return S.HasRange(KeyRange{lo: k, hi_: k})
} }
//*/
// AddRange adds range r to the set. // AddRange adds range r to the set.
func (S *RangedKeySet) AddRange(r KeyRange) { func (S *RangedKeySet) AddRange(r KeyRange) {
......
...@@ -1562,17 +1562,17 @@ func TestΔBTail(t *testing.T) { ...@@ -1562,17 +1562,17 @@ func TestΔBTail(t *testing.T) {
oo: K(1,2,3,4,5,oo)}), oo: K(1,2,3,4,5,oo)}),
// depth=2; bucket split; +3 in new bucket; t0 and t1 split; // depth=2; bucket split; +3 in new bucket; t0 and t1 split;
// +right arm (T7/B45-B89) which remain not tracked unless previously accessed. // +right arm (T7/B45-B89).
"T/T/B1:a,2:b", "T/T/B1:a,2:b",
Δ("T4/T2-T7/B1:a-B2:b,3:c-B4:d,5:e-B8:h,9:i", Δ("T4/T2-T7/B1:a-B2:b,3:c-B4:d,5:e-B8:h,9:i",
A{1: K(1,2,3), A{1: K(1,2,3,4,5,8,9,oo),
2: K(1,2,3), 2: K(1,2,3,4,5,8,9,oo),
3: K(1,2,3), 3: K(1,2,3,4,5,8,9,oo),
4: K(1,2,3,4,5), 4: K(1,2,3,4,5,8,9,oo),
5: K(1,2,3,4,5), 5: K(1,2,3,4,5,8,9,oo),
8: K(1,2,3, 8,9), 8: K(1,2,3,4,5,8,9,oo),
9: K(1,2,3, 8,9), 9: K(1,2,3,4,5,8,9,oo),
oo: K(1,2,3, 8,9,oo)}), oo: K(1,2,3,4,5,8,9,oo)}),
// 2 reflow to right B neighbour; 8 split into new B; δ=ø // 2 reflow to right B neighbour; 8 split into new B; δ=ø
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment