LijunChang / Graph_Edit_Distance

Exact graph edit distance (GED) computation and verification
MIT License
53 stars 14 forks source link

Am I making my file wrong or my understanding of GED is wrong? #7

Closed weathon closed 2 years ago

weathon commented 2 years ago

So I have 2 graph, I think the distance should be 1, but ./ged gives me 3

wg25r@vultr:~/CMT/Graph_Edit_Distance$ cat data.txt;echo "----";cat q.txt 
t 1 methane
v 1 carbon1
v 2 H1
v 3 H2
v 4 H3
v 5 H4
e 1 2 1
e 1 3 2
e 1 4 3
e 1 5 4
----
t 1 Chloromethane
v 1 carbon1
v 2 H1
v 3 H2
v 4 H3
v 5 Cl
e 1 2 1
e 1 3 2
e 1 4 3
e 1 5 4
wg25r@vultr:~/CMT/Graph_Edit_Distance$ ./ged -d data.txt -q q.txt -g
**** GED (Release) build at 04:15:36 May 25 2022 ***
Usage: ./ged -h -d database_file -q query_file -m running_mode -p search_paradigm -l lower_bound_method -t ged_threshold
**** Note that for GED verification, if the returned value is not -1, then it is only an upper bound of (and may be larger than) the exact GED

*** search astar BMao -1: data.txt q.txt ***
*** GEDs ***
[100% finished]3

*** GEDs ***
min_ged: 3, max_ged: 3
Total time: 1,113 (microseconds), total search space: 1
 #candidates: 1, #matches: 1
LijunChang commented 2 years ago

vertex id should start from 0. I think this caused the problem.

weathon commented 2 years ago

Problem solved! Thank you