Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

Eclipse Difference Browser algorithm

Thread view: 
Paul - 14 Jul 2006 16:33 GMT
I am looking for an (efficient) implementation of an algorithm for
heirarchical tree comparison.
How does the Eclipse Difference Browser (for Java) work, and where can
I find its implementation?
Oliver Wong - 14 Jul 2006 18:05 GMT
>I am looking for an (efficient) implementation of an algorithm for
> heirarchical tree comparison.
> How does the Eclipse Difference Browser (for Java) work, and where can
> I find its implementation?

   Eclipse is open source, so you can just view the source for whatever
you're looking for. I don't know of any "hierarchical tree comparison"
feature in Eclipse though. Are you perhaps thinking of the three-way CVS
comparator?

   - Oliver
Chris Smith - 15 Jul 2006 00:03 GMT
> I am looking for an (efficient) implementation of an algorithm for
> heirarchical tree comparison.
> How does the Eclipse Difference Browser (for Java) work, and where can
> I find its implementation?

If you mean "compare to...", that's not hierarchical at all.  Algorthms
for diff-style programs (what Eclipse does there) are ubiquitous and
easily found by Google, but I don't think they meet your stated need.  
If that's not what you mean, then can you clarify?

Signature

Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation

Chris Uppal - 15 Jul 2006 10:44 GMT
> I am looking for an (efficient) implementation of an algorithm for
> heirarchical tree comparison.

Very difficult in the general case.  As far as I know this is still an open
research topic.

If you can restrict the problem a bit then you can convert it into a linear
diffing problem.  Linear diffing is the subject of a /huge/ amount of research
(partly because the CS and genetics communities have tended to duplicate each
others efforts).  I could point you at some of the papers, but it sounds as if
you are just looking for a ready-made implementation -- and there are quite a
few which are easy to find on the net.

If you can restrict it so that the children of each node have a fixed order
(alphabetical, say), and you don't want to consider the possibility that a node
may have moved from one subtree to another, then you can use a linear diff,
recursing into each sub-tree.  Another way would be to linearise the entire
trees into a specific order, and then just do a big diff on the linear
representation.  If you do that then you could choose to take the depth into
account, or to ignore it for these purposes.

   -- chris


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.