Implements |
DFA | ||||||
Class Specifications |
|
||||||
File |
dfa_map.h | ||||||
Structure |
Each state is a pair of tag and STL map storing couples in *Q (key type is ). A map is implemented with a red-black tree. F is a bit vector. |
||||||
time |
Add/Remove state: O(1)
Add/Remove/Access transition: O(log2(c)) Iteration on edges:O(c) |
||||||
Space |
|||||||
Use Cases |
DFA_map constitutes a good tradeoff between speed and memory usage: transition accesses are relatively fast when state context is small and space complexity depends mainly on |Delta| and not on |Sigma|. Use it when the matrice is sparse and edge iteration frequent |