Bill Currie
84a68b139e
Rename set_iter_t's value to element.
...
Correct terminology and all :)
2012-12-21 14:09:00 +09:00
Bill Currie
6473951daa
Make the set notation more correct.
...
The empty set is now {}, the set of everything is now {...} and the rest
now have {} around the members.
2012-12-09 22:17:55 +09:00
Bill Currie
061e2be5d4
Re-write the set testing code.
...
Getting everything right with an enum proved to be too difficult if not
impossible. Also use better tests for equivalence and intersection.
Many more tests have been added. All pass :)
2012-12-09 13:52:48 +09:00
Bill Currie
94e804d786
Make some more set_test fixes.
...
Two inverted sets can never be disjoint.
2012-12-07 22:25:36 +09:00
Bill Currie
56956fc370
Rewrite the intersection tests.
...
The early bailout proved to be difficult to get right, so don't bother.
2012-12-07 22:16:51 +09:00
Bill Currie
b053edee17
Fix the handling of size in set_expand.
...
It was correct for set_add, but not for other ops :/ (out by 1)
2012-12-07 20:44:09 +09:00
Bill Currie
39920a4ea7
Fix the type when converting set of everything to string.
2012-12-07 19:35:37 +09:00
Bill Currie
e0c92b6089
Rename set_iter_t's member to value.
...
Makes more sense now that the membership of the value depends on the
inversion of the set.
2012-12-06 21:11:38 +09:00
Bill Currie
eb8fd55677
Move set.c into libQFutil.
...
Also move the ALLOC/FREE macros from qfcc.h to QF/alloc.h (needed to for
set.c).
Both modules are more generally useful than just for qfcc (eg, set
builtins for ruamoko).
2012-12-06 20:52:53 +09:00