Disjoint-set API. More...
#include <sys/types.h>
Go to the source code of this file.
Typedefs | |
typedef struct disjoint_set | disjoint_set_t |
Opaque type for a disjoint-set. | |
Functions | |
int | disjoint_set_new (disjoint_set_t **ds, size_t size) |
Creates a new disjoint-set. | |
int | disjoint_set_free (disjoint_set_t *ds) |
Frees a disjoint-set. | |
int | disjoint_set_union (disjoint_set_t *ds, size_t id1, size_t id2) |
Unites the sets that contain two elements. | |
int | disjoint_set_find (disjoint_set_t *ds, size_t *set_id, size_t id) |
Finds the set containing an element. |
Disjoint-set API.
Definition in file disjoint_set.h.