libflint/include/lfset.h

30 lines
652 B
C
Raw Normal View History

2021-02-01 22:06:37 +00:00
#ifndef LIBFLINT_SET_H
#define LIBFLINT_SET_H
2023-11-29 21:40:41 +00:00
#include "lflinkedlist.h"
2021-02-01 22:06:37 +00:00
#define Set List
2022-03-28 17:52:16 +00:00
void set_init(Set *set, int (*match)(const void *a, const void *b),
void (*destroy)(void *data));
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