Hi, i am trying to program the Baker and Bird two dimensional pattern
matching algorithm but i experience some difficulties.
First of all this is how the algorithm works: Baker and Bird searches a
n * n two dimensional array for all the occurrences of a two dimensional
m * m array (where m<n) using an automaton. If a match is found on one
row, then the m-1 rows bellow the current are examined to find out if
the rest of the array's lines match.
The algorithm is working but the problem is that it needs to call the
COMPILE_FCT(Fcompile) function, in order to construct the DFA, m times
for each of the partial matches of the n lines, a suboptimal solution.
Is there a way to create m different DFA's in the beginning of the
program and then just call them separately as needed without
constructing them all over again?
This has been bugging me for so long, i would appreciate any help!
Charis