Skip to content

Commit ca0db22

Browse files
stevelintonmarkuspf
authored andcommitted
Adjust for new bitfield concept
1 parent 0ca3eb0 commit ca0db22

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gap/avltree.gi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ AVL.TreeByOrderedList := function(l)
311311
#
312312
# Now assemble the bitfield with all the miscellaneous data
313313
#
314-
node[4] := AVL.Bitfields.builder(hr-hl+1, hasl, hasr, to - from + 1);
314+
node[4] := BuildBitfields(AVL.Bitfields.widths, hr-hl+1, hasl, hasr, to - from + 1);
315315
return [Maximum(hl,hr)+1, node, min, max];
316316
end;
317317
x := foo(l, 1, Length(l));
@@ -708,7 +708,7 @@ AVL.AddSetInnerGAP :=
708708

709709
if not ghi(avl[4]) then
710710
# inserting a new leaf here
711-
newnode := [,val,,AVL.Bitfields.builder(1,0,0,1)];
711+
newnode := [,val,,BuildBitfields(AVL.Bitfields.widths,1,0,0,1)];
712712
newnode[j] := avl;
713713
if IsBound(avl[i]) then
714714
newnode[i] := avl[i];
@@ -778,7 +778,7 @@ InstallMethod(AddSet, [IsAVLTreeRep and IsOrderedSetDS and IsMutable, IsObject],
778778
function(avl, val)
779779
local res;
780780
if not IsBound(avl!.lists[1]) then
781-
avl!.lists[1] := [,val,,AVL.Bitfields.builder(1,0,0,1)];
781+
avl!.lists[1] := [,val,,BuildBitfields(AVL.Bitfields.widths,1,0,0,1)];
782782
return 1;
783783
fi;
784784
res := AVL.AddSetInner(avl!.lists[1],val,avl!.isLess, AVL.Trinode);

tst/ordered.tst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ true
108108
gap> s2 := ShallowCopy(s);;
109109
gap> Size(s) = Size(s2);
110110
true
111-
gap> AddSet(s2, 101/2);
111+
gap> AddSet(s2, 101/2);;
112112
gap> 101/2 in s;
113113
false
114114
gap> AsList(s);
@@ -130,7 +130,7 @@ gap> IsAVLTreeRep(s2);
130130
true
131131
gap> Size(s) = Size(s2);
132132
true
133-
gap> AddSet(s2, 101/2);
133+
gap> AddSet(s2, 101/2);;
134134
gap> 101/2 in s;
135135
false
136136
gap> AsList(s);

0 commit comments

Comments
 (0)