discrete-frechet
discrete-frechet copied to clipboard
Different results from the for fast versions
Hi,
I'm trying to use your algorithm and actually implemented it in Matlab but I noticed for the following input the fast versions have different results:
p = [[62785, 5],
[62821, 5],
[62822, 5],
[62819, 5],
[62819, 5]]
q = [[44324, 1],
[44386, 1],
[44652, 1],
[44680, 2],
[40438, 2],
[42577, 2],
[42554, 2]]
Output:
Slow : 9.14999982342124e-05
22347.000201369312
Linear : 1.7583020962774754e-05
22347.000201369312
Sparse : 3.716698847711086e-05
22381.0002010634
Fast : 0.13922633399488404
22381.0002010634
Here's how the matrix looks like at the end for the Fast version:
[[18461.0004 18461.0004 18461.0004 18461.0004 22347.0002 22347.0002 22347.0002]
[18497.0004 18461.0004 18461.0004 18461.0004 inf inf inf]
[18498.0004 18461.0004 18461.0004 18461.0004 inf inf inf]
[18498.0004 18461.0004 18461.0004 18461.0004 22381.0002 22381.0002 22381.0002]
[18498.0004 18461.0004 18461.0004 18461.0004 inf 22381.0002 22381.0002]]
Here's how the matrix looks like for the linear version:
[[18461.0004 18461.0004 18461.0004 18461.0004 22347.0002 22347.0002 22347.0002]
[18497.0004 18461.0004 18461.0004 18461.0004 22383.0002 22347.0002 22347.0002]
[18498.0004 18461.0004 18461.0004 18461.0004 22384.0002 22347.0002 22347.0002]
[18498.0004 18461.0004 18461.0004 18461.0004 22381.0002 22347.0002 22347.0002]
[18498.0004 18461.0004 18461.0004 18461.0004 22381.0002 22347.0002 22347.0002]]
Thanks a lot though, I learned a lot going through your blog post and reading your code.