[q-lang-cvs] q/stdlib bag.q, 1.7, 1.8 dict.q, 1.10, 1.11 set.q, 1.8, 1.9
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2008-02-21 19:58:54
|
Update of /cvsroot/q-lang/q/stdlib In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9618 Modified Files: bag.q dict.q set.q Log Message: bugfix: check keys for semantic rather than syntactic equality Index: bag.q =================================================================== RCS file: /cvsroot/q-lang/q/stdlib/bag.q,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** bag.q 21 Feb 2008 09:03:04 -0000 1.7 --- bag.q 21 Feb 2008 19:58:49 -0000 1.8 *************** *** 152,159 **** deletea nil _ = (nil, false); ! deletea (bin Key _ nil R ) Key = (R, true); ! deletea (bin Key _ L nil) Key = (L, true); ! deletea (bin Key B (bin KL BL RL LL) R) Key = adjustd LeftHasChanged (bin LastK B NewL R) left where --- 152,159 ---- deletea nil _ = (nil, false); ! deletea (bin K _ nil R ) Key = (R, true) if Key = K; ! deletea (bin K _ L nil) Key = (L, true) if Key = K; ! deletea (bin K B (bin KL BL RL LL) R) Key if Key = K: = adjustd LeftHasChanged (bin LastK B NewL R) left where Index: dict.q =================================================================== RCS file: /cvsroot/q-lang/q/stdlib/dict.q,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dict.q 21 Feb 2008 11:48:29 -0000 1.10 --- dict.q 21 Feb 2008 19:58:49 -0000 1.11 *************** *** 132,137 **** inserta nil Key Val = ((bin Key Val iseq nil nil), true); ! inserta (bin Key _ B L R) Key Val ! = ((bin Key Val B L R), false); inserta (bin K V B L R) Key Val if Key < K: --- 132,136 ---- inserta nil Key Val = ((bin Key Val iseq nil nil), true); ! inserta (bin K _ B L R) Key Val = ((bin Key Val B L R), false) if Key = K; inserta (bin K V B L R) Key Val if Key < K: *************** *** 162,171 **** deletea nil _ = (nil, false); ! deletea (bin Key _ _ nil R ) Key ! = (R, true); ! deletea (bin Key _ _ L nil) Key ! = (L, true); ! deletea (bin Key _ B (bin KL VL BL RL LL) R ) Key = adjustd LeftHasChanged (bin LastK LastV B NewL R) left where --- 161,168 ---- deletea nil _ = (nil, false); ! deletea (bin K _ _ nil R ) Key = (R, true) if Key = K; ! deletea (bin K _ _ L nil) Key = (L, true) if Key = K; ! deletea (bin K _ B (bin KL VL BL RL LL) R ) Key if Key = K: = adjustd LeftHasChanged (bin LastK LastV B NewL R) left where Index: set.q =================================================================== RCS file: /cvsroot/q-lang/q/stdlib/set.q,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** set.q 21 Feb 2008 09:03:08 -0000 1.8 --- set.q 21 Feb 2008 19:58:49 -0000 1.9 *************** *** 130,134 **** inserta nil Key = ((bin Key iseq nil nil), true); ! inserta (bin Key B L R) Key = ((bin Key B L R), false); inserta (bin K B L R) Key if Key < K: --- 130,134 ---- inserta nil Key = ((bin Key iseq nil nil), true); ! inserta (bin K B L R) Key = ((bin Key B L R), false) if Key = K; inserta (bin K B L R) Key if Key < K: *************** *** 155,162 **** deletea nil _ = (nil, false); ! deletea (bin Key _ nil R ) Key = (R, true); ! deletea (bin Key _ L nil) Key = (L, true); ! deletea (bin Key B (bin KL BL RL LL) R) Key = adjustd LeftHasChanged (bin LK B NewL R) left where --- 155,162 ---- deletea nil _ = (nil, false); ! deletea (bin K _ nil R ) Key = (R, true) if Key = K; ! deletea (bin K _ L nil) Key = (L, true) if Key = K; ! deletea (bin K B (bin KL BL RL LL) R) Key if Key = K: = adjustd LeftHasChanged (bin LK B NewL R) left where |