Skip to content

Commit bd97c41

Browse files
committed
switch disjoint set to disjoint sets in docs (issue #740)
1 parent f90dd8c commit bd97c41

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This package implements a variety of data structures, including
1818
- Priority Queue
1919
- Fenwick Tree
2020
- Accumulators and Counters (i.e. Multisets / Bags)
21-
- Disjoint-Set
21+
- Disjoint-Sets
2222
- Binary Heap
2323
- Mutable Binary Heap
2424
- Ordered Dicts and Sets

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ makedocs(
1414
"priority-queue.md",
1515
"fenwick.md",
1616
"accumulators.md",
17-
"disjoint_set.md",
17+
"disjoint_sets.md",
1818
"heaps.md",
1919
"ordered_containers.md",
2020
"default_dict.md",
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Disjoint-Set
1+
# Disjoint-Sets
22

33
Some algorithms, such as finding connected components in undirected
44
graph and Kruskal's method of finding minimum spanning tree, require a
55
data structure that can efficiently represent a collection of disjoint
66
subsets. A widely used data structure for this purpose is the *Disjoint
7-
set forest*.
7+
set forest* (disjoint sets).
88

99
Usage:
1010

1111
```julia
12-
a = IntDisjointSet(10) # creates a forest comprised of 10 singletons
12+
a = IntDisjointSets(10) # creates a forest comprised of 10 singletons
1313
union!(a, 3, 5) # merges the sets that contain 3 and 5 into one and returns the root of the new set
1414
root_union!(a, x, y) # merges the sets that have root x and y into one and returns the root of the new set
1515
find_root!(a, 3) # finds the root element of the subset that contains 3
@@ -21,14 +21,14 @@ elem = push!(a) # adds a single element in a new set; returns the new e
2121
One may also use other element types:
2222

2323
```julia
24-
a = DisjointSet{AbstractString}(["a", "b", "c", "d"])
24+
a = DisjointSets{AbstractString}(["a", "b", "c", "d"])
2525
union!(a, "a", "b")
2626
in_same_set(a, "c", "d")
2727
push!(a, "f")
2828
```
2929

30-
Note that the internal implementation of `IntDisjointSet` is based on
31-
vectors, and is very efficient. `DisjointSet{T}` is a wrapper of
32-
`IntDisjointSet`, which uses a dictionary to map input elements to an
33-
internal index. Note for `DisjointSet`, `union!`, `root_union!` and
30+
Note that the internal implementation of `IntDisjointSets` is based on
31+
vectors, and is very efficient. `DisjointSets{T}` is a wrapper of
32+
`IntDisjointSets`, which uses a dictionary to map input elements to an
33+
internal index. Note for `DisjointSets`, `union!`, `root_union!` and
3434
`find_root!` return the index of the root.

0 commit comments

Comments
 (0)