-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Computing distances between two empty PersistenceDiagrams #54
Conversation
Pull Request Test Coverage Report for Build 3552291527
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much, I can't believe I missed such an obvious edge case!
Looks good, but I'd rather it returns a 0.0
, so the distances are always Float64
s.
Co-authored-by: mtsch <matijacufar@gmail.com>
Co-authored-by: mtsch <matijacufar@gmail.com>
Co-authored-by: mtsch <matijacufar@gmail.com>
Ah yes - I didn't pay attention to this. I accepted the suggestions. Thanks for developing the package, my collaborators and I are enjoying using it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good now. I'll bump the version and merge/register it now.
The fix is registered and can now be installed with the package manager. Thanks again! |
My pleasure! |
A distance (either Wasserstein or Bottleneck) between two empty PersistenceDiagrams should return zero. (Empty diagrams contain trivially the "diagonal" in the birth-death graph, and distance between the diagram and itself should be zero.)
Before this change, the code produces an error when applying either
hungarian
or_hopcroft_karp
algorithms inmatching.jl
, and the two errors are different.The pull request performs a simple test at the beginning of
Bottleneck()
andWasserstein()
functions and returns the distance zero or a zeroMatching
.The pull additionally adds a unit test group for this issue.