home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <stdarg.h>
- #include "sets.h"
- /***************************************************************************/
- boolean set_inequality(set *left, set *right)
- /***************************************************************************/
- /* Two sets are equal if they have the same type and size and the identical
- membership.
- */
- {
- int i;
-
- /* check base_type and set_size */
- if(check_set_types(left,right) == FAILURE)
- return TRUE; /* success, they're not equal */
-
- /* If each word of left equals the corresponding word of right, then the
- sets are equal. Note that each set will have ALL bits at member
- locations higher than nmembers reset to zero.
- */
- for(i=0;i<left->member_recs;i++)
- if(left->word[i] != right->word[i])
- return TRUE;
-
- return FALSE;
-
- } /* end set_inequality */
-
-