#ifndef TOSET #define TOSET struct toset; typedef struct toset *toset; /* Since the set is totally ordered, if not x < y and not y < x, then x = y */ /* create a totally ordered set using compare as a strict comparison */ extern toset toset_create(int compare(void *, void *)); extern void toset_insert(toset t, void *element); extern void toset_delete(toset t, void *element); extern int toset_member(toset t, void *element); extern int toset_empty(toset t); extern void *toset_smallest(toset t); /* the first set becomes the union of the two. The second is not altered */ extern void toset_union(toset s, toset t); /* the first set becomes the intersection of the two. The second is not altered */ extern void toset_intersection(toset s, toset t); #endif