carl  24.04
Computer ARithmetic Library
container_types.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "pointerOperations.h"
4 
5 #include <cstring>
6 #include <map>
7 #include <memory>
8 #include <set>
9 #include <unordered_map>
10 #include <unordered_set>
11 #include <vector>
12 
13 namespace carl
14 {
15  // Structures.
16 
17  template<typename T>
19  template<typename T>
21  template<typename T>
23  template<typename T>
25 
26  template<typename T>
28  template<typename T>
30  template<typename T>
32  template<typename T>
34 
35  template<typename T>
37  template<typename T>
39  template<typename T>
41  template<typename T>
43 
44 
45  template<typename T>
46  using PointerSet = std::set<const T*, pointerLess<T>>;
47 
48  template<typename T>
49  using PointerMultiSet = std::multiset<const T*, pointerLess<T>>;
50 
51  template<typename T1,typename T2>
52  using PointerMap = std::map<const T1*, T2, pointerLess<T1>>;
53 
54  template<typename T>
55  using SharedPointerSet = std::set<std::shared_ptr<const T>, sharedPointerLess<T>>;
56 
57  template<typename T>
58  using SharedPointerMultiSet = std::multiset<std::shared_ptr<const T>, sharedPointerLess<T>>;
59 
60  template<typename T1,typename T2>
61  using SharedPointerMap = std::map<std::shared_ptr<const T1>, T2, sharedPointerLess<T1>>;
62 
63  template<typename T>
64  using FastSet = std::unordered_set<T, std::hash<T>>;
65 
66  template<typename T1,typename T2>
67  using FastMap = std::unordered_map<T1, T2, std::hash<T1>>;
68 
69  template<typename T>
70  using FastPointerSet = std::unordered_set<const T*, pointerHash<T>, pointerEqual<T>>;
71 
72  template<typename T1,typename T2>
73  using FastPointerMap = std::unordered_map<const T1*, T2, pointerHash<T1>, pointerEqual<T1>>;
74 
75  template<typename T>
76  using FastSharedPointerSet = std::unordered_set<std::shared_ptr<const T>, sharedPointerHash<T>, sharedPointerEqual<T>>;
77 
78  template<typename T1,typename T2>
79  using FastSharedPointerMap = std::unordered_map<std::shared_ptr<const T1>, T2, sharedPointerHash<T1>, sharedPointerEqual<T1>>;
80 
81  template<typename T>
82  using FastPointerSetB = std::unordered_set<const T*, pointerHashWithNull<T>, pointerEqualWithNull<T>>;
83 
84  template<typename T1,typename T2>
85  using FastPointerMapB = std::unordered_map<const T1*, T2, pointerHashWithNull<T1>, pointerEqualWithNull<T1>>;
86 
87  template<typename T>
88  using FastSharedPointerSetB = std::unordered_set<std::shared_ptr<const T>, sharedPointerHashWithNull<T>, pointerEqualWithNull<T>>;
89 
90  template<typename T1,typename T2>
91  using FastSharedPointerMapB = std::unordered_map<std::shared_ptr<const T1>, T2, sharedPointerHashWithNull<T1>, pointerEqualWithNull<T1>>;
92 
93 } // namespace carl
carl is the main namespace for the library.
std::unordered_set< const T *, pointerHash< T >, pointerEqual< T > > FastPointerSet
std::set< const T *, pointerLess< T > > PointerSet
std::set< std::shared_ptr< const T >, sharedPointerLess< T > > SharedPointerSet
std::unordered_map< std::shared_ptr< const T1 >, T2, sharedPointerHash< T1 >, sharedPointerEqual< T1 > > FastSharedPointerMap
std::multiset< std::shared_ptr< const T >, sharedPointerLess< T > > SharedPointerMultiSet
std::unordered_map< const T1 *, T2, pointerHashWithNull< T1 >, pointerEqualWithNull< T1 > > FastPointerMapB
std::unordered_map< std::shared_ptr< const T1 >, T2, sharedPointerHashWithNull< T1 >, pointerEqualWithNull< T1 > > FastSharedPointerMapB
std::unordered_set< T, std::hash< T > > FastSet
std::map< const T1 *, T2, pointerLess< T1 > > PointerMap
std::unordered_set< const T *, pointerHashWithNull< T >, pointerEqualWithNull< T > > FastPointerSetB
std::multiset< const T *, pointerLess< T > > PointerMultiSet
std::unordered_set< std::shared_ptr< const T >, sharedPointerHash< T >, sharedPointerEqual< T > > FastSharedPointerSet
std::map< std::shared_ptr< const T1 >, T2, sharedPointerLess< T1 > > SharedPointerMap
std::unordered_set< std::shared_ptr< const T >, sharedPointerHashWithNull< T >, pointerEqualWithNull< T > > FastSharedPointerSetB
std::unordered_map< const T1 *, T2, pointerHash< T1 >, pointerEqual< T1 > > FastPointerMap
std::unordered_map< T1, T2, std::hash< T1 > > FastMap
Alternative specialization of std::equal_to for pointer types.
Alternative specialization of std::less for pointer types.
Alternative specialization of std::hash for pointer types.