libflint/include/set.h

21 lines
635 B
C
Raw Normal View History

2021-02-01 22:06:37 +00:00
#ifndef LIBFLINT_SET_H
#define LIBFLINT_SET_H
#include "linkedlist.h"
#define Set List
2021-02-01 22:27:01 +00:00
void set_init(Set* set, int (*match)(const void* a, const void* b),
2021-02-01 22:06:37 +00:00
void (*destroy)(void* data));
2021-02-01 22:27:01 +00:00
void set_destroy(Set* set);
int set_insert(Set* set, const void* data);
int set_remove(Set* set, void** data);
int set_union(Set* setu, const Set* a, const Set* b);
int set_intersection(Set* seti, const Set* a, const Set* b);
int set_difference(Set* setd, const Set* a, const Set* b);
int set_is_member(const Set* set, const void* data);
int set_is_subset(const Set* a, const Set* b);
int set_is_equal(const Set* a, const Set* b);
2021-02-01 22:06:37 +00:00
#endif