Go to the documentation of this file.
10 #include "int_sizes.h"
44 #define SET_ITERATE( set, element ) set_first_element(set); while((element = set_next_element(set)))
46 #define SET_ITERATE_RANDOM_START( set, offset_bookkeep, element ) set_random_element(set, &offset_bookkeep); while((element = set_next_element_with_offset(set, offset_bookkeep)))
70 struct set *
set_union(
struct set *s1,
struct set *s2);
102 int set_insert(
struct set *s,
const void *element);
130 int set_push(
struct set *h,
const void *element);
146 int set_remove(
struct set *s,
const void *element);
void ** set_values(struct set *s)
A set_size(s) array of the current elements in the set in a random order.
struct set * set_duplicate(struct set *s)
Duplicate a set from an existing set.
void * set_next_element(struct set *s)
Continue iteration over all elements.
struct set * set_union(struct set *s1, struct set *s2)
Unions two sets into one set.
int set_insert_set(struct set *s, struct set *s2)
Insert an existing set into the set.
void * set_next_element_with_offset(struct set *s, int offset_bookkeep)
Continue iteration over all elements from an arbitray offset.
int set_size(struct set *s)
Count the entries in a set.
struct set * set_create(int buckets)
Create a new set.
void set_first_element(struct set *s)
Begin iteration over all the elements.
void * set_pop(struct set *s)
Remove an arbitrary element from the set.
int set_insert(struct set *s, const void *element)
Insert an element to the set.
int set_push(struct set *h, const void *element)
Insert an element to the set.
void set_random_element(struct set *s, int *offset_bookkeep)
Begin iteration over all elements from a random offset.
void set_clear(struct set *s)
Remove all entries from a set.
int set_lookup(struct set *s, void *element)
Look up a element in the set.
int set_insert_list(struct set *s, struct list *l)
Insert an existing list into the set.
void set_delete(struct set *s)
Delete a set.
int set_remove(struct set *s, const void *element)
Remove an element.