Research Article
A Practical and Scalable Tool to Find Overlaps between Sequences
Algorithm 3
Finding all-pairs suffix-prefix.
(1) Function findallpairs(node ptr) | (2) for each string in Group do | (3) is the first character in | (4) while is not an ending character in do | (5) = position of | (6) = ptr; ; ; | (7) while true do | (8) if the character in position is the ending character in then | (9) for each string in .range do | (10) if the suffix prefix match between and then | (11) is a suffix prefix match ( and ) | (12) end if | (13) end for | (14) break; | (15) end if | (16) if . then | (17) = character in position in | (18) = the character to which is pointing | (19) if = then | (20) ++; ++; ++; | (21) else | (22) break | (23) end if | (24) else | (25) = character in position in | (26) if there is a branch for the , labeled by then | (27) = .branch() | (28) ++; ++; ++; | (29) else | (30) break | (31) end if | (32) end if | (33) end while | (34) is the next character in | (35) end while | (36) end for |
|