'Best' Diff Algorithm [closed]

妖精的绣舞 提交于 2019-11-30 13:14:15

问题


I need to implement a Diff algorithm in VB.NET to find the changes between two different versions of a piece of text. I've had a scout around the web and have found a couple of different algorithms.

Does anybody here know of a 'best' algorithm that I could implement?


回答1:


Well I've used the c# version on codeproject and its really good for what I wanted...

http://www.codeproject.com/KB/recipes/diffengine.aspx

You can probably get this translated into VB.net via an online converter if you can't do it yourself...




回答2:


I like An O(ND) Difference Algorithm and Its Variations by Eugene Myers. I believe it's the algorithm that was used in GNU diff. For a good background see Wikipedia.

This is quite theoretical and you might wish to find source code, but I'm not aware of any in VB.




回答3:


I don't know for sure if it's the best diff algorithms but you might want to check out those links that talks about SOCT4 and SOCT6

http://dev.libresource.org/home/doc/so6-user-manual/concepts

and also:
http://www.loria.fr/~molli/pmwiki/uploads/Main/so6group03.pdf http://www.loria.fr/~molli/pmwiki/uploads/Main/diffalgo.pdf



来源:https://stackoverflow.com/questions/3144/best-diff-algorithm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!