|
FE 0.15.0
A C++23 toolkit for writing compiler/interpreter frontends.
|
Hash-consed sets of D*. More...
#include <fe/xtrie.h>
Classes | |
| class | Set |
Public Member Functions | |
Construction | |
| XTrie & | operator= (const XTrie &)=delete |
| XTrie () | |
| XTrie (const XTrie &)=delete | |
| XTrie (XTrie &&other) | |
Set Operations | |
| |
| template<std::random_access_iterator I> | |
| Set | create (I begin, I end) |
| Create a Set with all elements in [begin, end). | |
| template<std::ranges::input_range R> | |
| Set | create (R &&r) |
Create a Set wih all elements in r. | |
| Set | create (std::initializer_list< D * > list) |
Create a Set wih all elements in list. | |
| Set | insert (Set s, D *d) |
| Yields \(s \cup \{d\}\). | |
| Set | merge (Set s1, Set s2) |
| Yields \(s_1 \cup s_2\). | |
| Set | erase (Set s, D *d) |
| Yields \(s \setminus \{d\}\). | |
DOT output | |
| void | dot () |
| void | dot (std::ostream &os) const |
| void | swap (XTrie &s1, XTrie &s2) noexcept |
Hash-consed sets of D*.
Small sets are sorted arrays, large ones paths in a trie; either way, equal sets are pointer-equal. This is an IndexedTrie as described here. K is a key trait that grants access to the two uint32_ts XTrie needs on D:
N is the maximum size of an array set; bigger sets live in the trie.
|
inline |
|
delete |
References XTrie().
|
inline |
|
inlinenodiscard |
Create a Set wih all elements in r.
Definition at line 463 of file xtrie.h.
References create(), and fe::Vector().
|
inlinenodiscard |
Create a Set wih all elements in list.
Definition at line 469 of file xtrie.h.
References create(), and fe::Vector().
|
inline |
|
inline |
|
delete |
References XTrie().