1 #ifndef VCSN_MISC_SET_HH
2 # define VCSN_MISC_SET_HH
18 template <
typename T,
typename Compare,
typename Alloc>
19 struct hash<set<T, Compare, Alloc>>
21 using type = set<T, Compare, Alloc>;
25 for (
const auto& s: ss)
35 template <
typename T,
typename Compare,
typename Alloc>
37 has(
const std::set<T, Compare, Alloc>& s,
const T& e)
41 template <
typename Key,
typename Value,
typename Comp,
typename Alloc>
42 std::set<typename std::map<Key, Value, Comp, Alloc>::mapped_type>
43 image(
const std::map<Key, Value, Comp, Alloc>& m);
46 template <
typename T,
typename Compare,
typename Alloc>
47 std::set<T, Compare, Alloc>
49 const std::set<T, Compare, Alloc>& set2);
52 template <
typename T,
typename Compare,
typename Alloc>
53 std::set<std::set<T, Compare, Alloc>>
57 template <
typename T,
typename Compare,
typename Alloc>
58 std::set<T, Compare, Alloc>
59 get_union(
const std::set<T, Compare, Alloc>& set1,
60 const std::set<T, Compare, Alloc>& set2);
63 template <
typename T,
typename Compare,
typename Alloc>
65 print(
const std::set<T, Compare, Alloc>& set, std::ostream& o);
68 template <
typename Container1,
typename Container2>
69 bool subset(
const Container1& set1,
const Container2& set2)
75 #endif // !VCSN_MISC_SET_HH
bool subset(const Container1 &set1, const Container2 &set2) ATTRIBUTE_PURE
Whether set1 ⊆ set2.
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.
std::ostream & print(const ValueSet &vs, const typename ValueSet::value_t &v, std::ostream &o, const std::string &format)
Applies to (ValueSet, Value, ostream, string): for expansionset, polynomialset, ratexpset, and weightset.
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.
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.
size_t operator()(const type &ss) const
set< T, Compare, Alloc > type
bool has(const std::map< Key, Value, Compare, Alloc > &s, const Key &e)