extern unsigned unsigned_set (const ullmanset<1> &s); extern unsigned unsigned_set (const bitset &s); extern unsigned unsigned_set (const set &s); smallbitset::smallbitset (const bitset &t) : n(t.size ()), x(0) { assert (t.size () <= max_size); if (n) { assert (t.v.size () == 1); x = t.v[0]; } assert ((x >> n) == 0); } template ullmanset::ullmanset (const bitset &t) : d(0) { *this = ullmanset (t.size ()); for (bitset_const_iter i = t; i; i ++) push (i.val ()); } template ullmanset & ullmanset::operator = (const bitset &t) { *this = ullmanset (t.size ()); for (bitset_const_iter i = t; i; i ++) push (i.val ()); return *this; } template set & setassign (set &to, unsigned dummy_size, const ullmanset &from) { assert (dummy_size == from.size ()); to = set (); for (ullmanset_const_iter i = from; i; i ++) to.push (i.val ()); return to; } template ullmanset & setassign (ullmanset &to, unsigned size, const set &from) { to = ullmanset (size); for (set_const_iter i = from; i; i ++) to.push (i.val ()); return to; }