17 #ifndef AWALI_MISC_SET_HH
18 # define AWALI_MISC_SET_HH
40 for (
const auto& s: ss)
52 template <
typename T,
typename Compare,
typename Alloc>
54 has(
const std::set<T, Compare, Alloc>& s,
const T& e)
58 template <
typename Key,
typename Value,
typename Comp,
typename Alloc>
59 std::set<typename std::map<Key, Value, Comp, Alloc>::mapped_type>
60 image(
const std::map<Key, Value, Comp, Alloc>& m);
63 template <
typename T,
typename Compare,
typename Alloc>
64 std::set<T, Compare, Alloc>
66 const std::set<T, Compare, Alloc>& set2);
69 template <
typename T,
typename Compare,
typename Alloc>
70 std::set<std::set<T, Compare, Alloc>>
74 template <
typename T,
typename Compare,
typename Alloc>
75 std::set<T, Compare, Alloc>
77 const std::set<T, Compare, Alloc>& set2);
80 template <
typename T,
typename Compare,
typename Alloc>
82 print(
const std::set<T, Compare, Alloc>& set, std::ostream& o);
85 template <
typename Container1,
typename Container2>
86 bool subset(
const Container1& set1,
const Container2& set2)
std::set< T, Compare, Alloc > intersection(const std::set< T, Compare, Alloc > &set1, const std::set< T, Compare, Alloc > &set2)
The intersection of two sets.
std::ostream & print(const std::set< T, Compare, Alloc > &set, std::ostream &o)
Print with a separator. Meant to help debugging.
bool subset(const Container1 &set1, const Container2 &set2) ATTRIBUTE_PURE
Whether set1 ⊆ set2.
Definition: set.hxx:105
bool has(const std::map< Key, Value, Compare, Alloc > &s, const Key &e)
Definition: map.hh:53
std::set< typename std::map< Key, Value, Comp, Alloc >::mapped_type > image(const std::map< Key, Value, Comp, Alloc > &m)
The set of values of a map.
Definition: set.hxx:33
std::set< T, Compare, Alloc > get_union(const std::set< T, Compare, Alloc > &set1, const std::set< T, Compare, Alloc > &set2)
The union of two sets.
std::set< std::set< T, Compare, Alloc > > intersection_closure(std::set< std::set< T, Compare, Alloc >> pset)
The set of all the intersections of the sets in pset.
Main namespace of Awali.
Definition: ato.hh:22
size_t operator()(const set< T > &ss) const
Definition: set.hh:37
void hash_combine(std::size_t &seed, const T &v)
Definition: hash.hh:27