This page contains the History_Counting_Fa Package documentation.
Bases: netbench.pattern_match.b_dfa.b_dfa
Class for HistoryCountingFA.
For how to use this class see ‘example_of_use.py’ or look inside tests correctly method compute().
Fuction for make HistoryCountingFA.
Parameter: | NFA (nfa_data) – NFA |
---|---|
Rises deterministic_error: | |
Automat must be Deterministic before calling compute() |
Report consumed memory in bytes. Naive mapping algorithm is used (2D array). Basic algorithm for this variant of mapping is: M = |states| * |alphabet| * ceil(log(|states| + 1, 2) / 8) For History is: basic + Mem(Flags) + (State * Sym * Flags * 2)
Returns: | Returns number of bytes. |
---|---|
Return type: | int |
Report consumed memory in bytes. Optimal mapping algorithm is used (with oracle). Basic algorithm for this variant of mapping is: M = |transitions| * ceil(log(|states|, 2) / 8). For History is: basic + Mem(Flags) + (Tran*Flags*2).
Returns: | Returns number of bytes. |
---|---|
Return type: | int |
This function will find patterns in the given string by the approach.
Parameters: |
|
---|---|
Returns: | Bitmap of matched regular expressions. |
Return type: | list(int) |
Bases: unittest.TestCase
Test module for class HistoryCountingFA.