10 #ifndef TEUCHOS_SET_HPP
11 #define TEUCHOS_SET_HPP
15 #include <Teuchos_Assert.hpp>
20 void unite_with(std::set<T>& a, std::set<T>
const& b) {
21 for (
typename std::set<T>::const_iterator it = b.begin(); it != b.end(); ++it) {
28 void unite(std::set<T>& result, std::set<T>
const& a, std::set<T>
const& b) {
30 unite_with(result, b);
34 void subtract_from(std::set<T>& a, std::set<T>
const& b) {
35 for (
typename std::set<T>::const_iterator it = b.begin(); it != b.end(); ++it) {
37 typename std::set<T>::iterator it2 = a.find(x);
38 if (it2 == a.end())
continue;
44 bool intersects(std::set<T>
const& a, std::set<T>
const& b) {
45 for (
typename std::set<T>::const_iterator it = b.begin(); it != b.end(); ++it) {
47 typename std::set<T>::const_iterator it2 = a.find(x);
48 if (it2 != a.end())
return true;