Skip to content

Commit

Permalink
clear central on new longest lcs
Browse files Browse the repository at this point in the history
  • Loading branch information
nlouwen committed Dec 3, 2024
1 parent 54487ab commit e312d46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions big_scape/comparison/lcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ def find_domain_lcs_region(

# Length

# clear the list if it's not empty and the current match is longer
# clear the lists if it's not empty and the current match is longer
if len(use_longest_list) > 0 and length > use_longest_list[0][1]:
use_longest_list.clear()
use_central_list.clear()

# add the match to the list if it's empty or the current match is equal length
# or longer than the existing match
Expand Down Expand Up @@ -523,9 +524,10 @@ def find_domain_lcs_protocluster(

# Length

# clear the list if it's not empty and the current match is longer
# clear the lists if it's not empty and the current match is longer
if len(use_longest_list) > 0 and length > use_longest_list[0][1]:
use_longest_list.clear()
use_central_list.clear()

# add the match to the list if it's empty or the current match is equal length
# or longer than the existing match
Expand Down

0 comments on commit e312d46

Please sign in to comment.