anigmetov / hera

Other
4 stars 3 forks source link

Infinite points #5

Closed mglisse closed 3 years ago

mglisse commented 3 years ago

I notice there is code to handle points that have one infinite coordinate, but not points with 2 infinite coordinates. If I call the example ./wasserstein_dist A B -q 2 with the files

-inf inf

-inf inf 0 1

I get a distance nan. If two points 0 inf are considered to be at distance 0 from each other, I think it would make sense for two points -inf inf to be at distance 0 as well. Points inf inf are probably not relevant because they are on the diagonal, see #4.

anigmetov commented 3 years ago

Yes, it makes sense, I updated the code.

mglisse commented 3 years ago

Thank you!