/*
 * set.h: set (based on hash) storage for C..
 *
 * (C) Duncan C. White, 1996-2007 although it seems longer:-)
 */

/*
 * a set is a hash table of key trees..
 */

typedef struct set_s *set;
typedef char *key;

typedef void (*printfunc)( FILE *, key );
typedef void (*foreachcbfunc)( key, void * );

extern set setCreate( printfunc );
extern void setEmpty( set );
extern set setCopy( set );
extern void setFree( set );
extern void setInclude( set, key );
extern void setExclude( set, key );
extern void setModify( set s, key );
extern int setIn( set, key );
extern void setUnion( set, set );
extern void setIntersection( set, set );
extern void setSubtraction( set, set );
extern void setDiff( set, set );
extern int setMembers( set );
extern void setMetrics( set s, int *, int *, double * );
extern void setForeach( set, foreachcbfunc, void * );
extern void setDump( FILE *, set );
