qwangmsk / MLCS-Algorithms

A fast heuristic search algorithm for finding the longest common subsequence of multiple strings
8 stars 0 forks source link

mlcsparallel.cpp problems #5

Open kylak opened 1 week ago

kylak commented 1 week ago

mlcsparallel.cpp didn't succeed to compile with g++ -pthread mlcsparallel.cpp -o dc.exe.

Here are the errors : Line 434 : cannot convert ‘bool’ to ‘int*’. Same error on line 435.

gustavbrlty commented 1 week ago

I succeeded to compile by changing those false values by NULL, but maybe doing so fails the algorithm.

So I tried with these added NULL, here are some results I got :

for time ./dc.exe 1 2 20 test.txt with test.txt being :

helloworld
helloword

I got (as expected) :

HELLOWORLD
HELLOWOR-D

for time ./dc.exe 1 3 20 test.txt with test.txt being :

helloworld
helloword
helloworm

We should have :

helloworld
hellowor-d
helloworm-

but I got :

HELLOWORLD
HELLOWORD-
HELLOWORM-

for time ./dc.exe 1 2 20 test.txt with test.txt being :

αμελμαιειδε
μελμαιει

We should have :

αμελμαιειδε
-μελμαιει--

but I got :

�--------�μελμαιειδε
μελμαιει--------------

So either my NULL patch is wrong, either the C++ code in mlcsparallel.cpp is wrong, either the algorithm istelf is wrong.