Data Structures Lerax  1.1.0
Opinionated Data Structures & Algorithms
Loading...
Searching...
No Matches
set-disjoint.h
Go to the documentation of this file.
1#ifndef SET_DISJOINT_H
2#define SET_DISJOINT_H
3
8typedef struct DisjointSet DisjointSet;
9
17
24
33
41void set_disjoint_union(DisjointSet *ds, int i, int j);
42
43#endif /* SET_DISJOINT_H */
int set_disjoint_find(DisjointSet *ds, int i)
Finds the representative of the set containing element i.
void set_disjoint_free(DisjointSet *ds)
Free a disjoint-set data structure.
DisjointSet * set_disjoint_create(int n)
Creates a new disjoint-set data structure with n elements.
struct DisjointSet DisjointSet
A disjoint-set data structure.
Definition set-disjoint.h:8
void set_disjoint_union(DisjointSet *ds, int i, int j)
Merges the sets containing elements i and j.