22 lines
1.0 KiB
Markdown
22 lines
1.0 KiB
Markdown
[alg.set.operations.general]
|
||
|
||
# 26 Algorithms library [[algorithms]](./#algorithms)
|
||
|
||
## 26.8 Sorting and related operations [[alg.sorting]](alg.sorting#alg.set.operations.general)
|
||
|
||
### 26.8.7 Set operations on sorted structures [[alg.set.operations]](alg.set.operations#general)
|
||
|
||
#### 26.8.7.1 General [alg.set.operations.general]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L10265)
|
||
|
||
Subclause [[alg.set.operations]](alg.set.operations "26.8.7 Set operations on sorted structures") defines all the basic set operations on sorted structures[.](#1.sentence-1)
|
||
|
||
They also work with multisets ([[multiset]](multiset "23.4.7 Class template multiset"))
|
||
containing multiple copies of equivalent elements[.](#1.sentence-2)
|
||
|
||
The semantics of the set operations are generalized to multisets
|
||
in a standard way by defining set_union to contain the maximum number of occurrences of every element,set_intersection to contain the minimum, and so on[.](#1.sentence-3)
|