1 #ifndef TEUCHOS_SET_HPP
2 #define TEUCHOS_SET_HPP
6 #include <Teuchos_Assert.hpp>
11 void unite_with(std::set<T>& a, std::set<T>
const& b) {
12 for (
typename std::set<T>::const_iterator it = b.begin(); it != b.end(); ++it) {
19 void unite(std::set<T>& result, std::set<T>
const& a, std::set<T>
const& b) {
21 unite_with(result, b);
25 void subtract_from(std::set<T>& a, std::set<T>
const& b) {
26 for (
typename std::set<T>::const_iterator it = b.begin(); it != b.end(); ++it) {
28 typename std::set<T>::iterator it2 = a.find(x);
29 if (it2 == a.end())
continue;
35 bool intersects(std::set<T>
const& a, std::set<T>
const& b) {
36 for (
typename std::set<T>::const_iterator it = b.begin(); it != b.end(); ++it) {
38 typename std::set<T>::const_iterator it2 = a.find(x);
39 if (it2 != a.end())
return true;