[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Logical Operations on Numbers



Section 12.7 (pp 220-225) describes CL operations for manipulating
finite sets using integers.  Unfortunately there does not seem to
be any predicate to determine if one set is a subset of another
using this representation.  'logtest' serves as an intersection test,
'logbitp' serves as a member test but to determine subset relations
seems to require computing the set difference (with logandc2) and
comparing the result with zero.  If the sets are moderately large
(say several hundred elements) this involves expensive bignum operations
that I would like to avoid.

I have also thought of using bitvectors, but the operations on bitvectors
(p 294) only operate on bitvectors of the same length.  Furthermore,
the bitvector functions only include bitwise operations, but no subset
test here either.

Isn't SUBSET considered an important set manipulation primitive?

Chris Eliot
University of Massashusetts at Amherst