[Cs3] set theoretical operations on sets
Mikhail Nesterenko
mikhail at cs.kent.edu
Wed Sep 18 16:49:30 EDT 2019
CS3 students,
There was a question about set theoretical operations on sets. Set
theoretical operations are:
- intersection of two sets
- set difference
- set union
- set symmetric difference.
These operations are available as algorithms for any container where
elements are sorted. That is, they can be applied to (pre) sorted
vectors or lists. We are going to study these algorithms. The example
is here:
http://vega.cs.kent.edu/~mikhail/classes/cs3/Examples/STLAlgorithms/Set/setAlgorithms.cpp
However, as sets are already sorted, the algorithms for
set-theoretical operations may be applied on them directly (without
pre-sorting) as in for non-sorted containers.
Thanks,
--
Mikhail
More information about the cs3
mailing list