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

NodeMatcher that choses match with least amount of differences #45

Open
bodewig opened this issue Jan 5, 2016 · 2 comments
Open

NodeMatcher that choses match with least amount of differences #45

bodewig opened this issue Jan 5, 2016 · 2 comments

Comments

@bodewig
Copy link
Member

bodewig commented Jan 5, 2016

Some scenarios would benefit from an NodeMatcher that simply "does what I mean": Try all possible pairings of control/test nodes and pick the permutation that contains the least number of differences (and prefer "similar" over "different").

The ElementSelector interface is not suitable since it only sees pairs of nodes but in order to be useful the implementation needs to see all candidate nodes at once.

Probably such a NodeMatcher would require quite a bit of caching of decisions already made. It would also require knowledge of the DifferenceEngine it belongs, at least to the DifferenceEvaluator. On the other hand it should not use the specified ComparisonController and certainly not inform ComparisonListeners at all while searching for candidate matches.

Of course this option would be way more expensive than carefully chosen ElementSelectors, in particular for big documents with many siblings at more than one level of the tree. Therefore it shouldn't be the default choice.

@sunshinecool
Copy link

Is anyone working on this issue? I am kind of interested in working on this update.

@bodewig
Copy link
Member Author

bodewig commented Oct 24, 2016

I'm not aware of anybody working on it. If you wanted to jump in, that would be great.

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

No branches or pull requests

2 participants