Skip to content
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

intelligent set diffs #6

Open
adamw opened this issue Aug 16, 2019 · 3 comments
Open

intelligent set diffs #6

adamw opened this issue Aug 16, 2019 · 3 comments

Comments

@adamw
Copy link
Member

adamw commented Aug 16, 2019

apart from computing additional/missing elements, we could try to pair up mismatching elements when diffing sets in an intelligent way, so that two (different) elements are paired up in the final diff using "minimal difference". Or maybe we could assume that elements should be paired if they have e.g. 3 differences at most?

@ghostbuster91
Copy link
Collaborator

Do you have any examples where that could be useful?

@adamw
Copy link
Member Author

adamw commented Jan 12, 2021

Well if you have ... Set(Person("Adam", true, 10), Person("John", true, 20)) and Set(Person("Adam", fale, 10), Person("John", false, 20)) I'd like to have adam paired with adam nad john with john in the diff :)

@ghostbuster91
Copy link
Collaborator

Sounds cool but, that would require additional entity in the library or the redesign of ObjectMatcher. Anyway, I think that there should also be some threshold value below which there is no point in matching two objects. The threshold value could be a parameter to the SmartObjectMatcher constructor, WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants