Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] Similarity in ordered list
[EMF Compare] Similarity in ordered list [message #484419] Mon, 07 September 2009 12:53 Go to next message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
Hello Laurent,

I'd like to compare two objects, say o1 and o2. Those objects contain an
EList<IMyObject>.

The compare is pretty difficult because the lists might be shuffled and
the object might change a lot.

In order for the diff ordering to be efficient I need rules to ensure that
two IMyObject are similar. Otherwise the diff algorithm will conclude with
a lot of additions and deletions in the list. So I need to precise what
makes two IMyObject similar or not. I already played with
ReferencesCheck#shouldBeIgnored(EReference) and
AttributesCheck#shouldBeIgnored(EAttribute) as you proposed but it's not
enough. I need to compute intermediate metrics and maybe to give some
attributes more importance than others.

Do you think this is something that fits in EMF Compare's framework ? How
can I do this ?

Best regards,
Guillaume
Re: [EMF Compare] Similarity in ordered list [message #484426 is a reply to message #484419] Mon, 07 September 2009 13:03 Go to previous messageGo to next message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
Ok, looking closer to the code, I understood I had to write my own
MatchEngine (extending from GenericMatchEngine) and override the
GenericMatchEngine#isSimilar(EObject obj1, EObject obj2) function.

Guillaume Chatelet wrote:

> Hello Laurent,

> I'd like to compare two objects, say o1 and o2. Those objects contain an
> EList<IMyObject>.

> The compare is pretty difficult because the lists might be shuffled and
> the object might change a lot.

> In order for the diff ordering to be efficient I need rules to ensure that
> two IMyObject are similar. Otherwise the diff algorithm will conclude with
> a lot of additions and deletions in the list. So I need to precise what
> makes two IMyObject similar or not. I already played with
> ReferencesCheck#shouldBeIgnored(EReference) and
> AttributesCheck#shouldBeIgnored(EAttribute) as you proposed but it's not
> enough. I need to compute intermediate metrics and maybe to give some
> attributes more importance than others.

> Do you think this is something that fits in EMF Compare's framework ? How
> can I do this ?

> Best regards,
> Guillaume
Re: [EMF Compare] Similarity in ordered list [message #484478 is a reply to message #484426] Mon, 07 September 2009 16:02 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050502010406050308060000
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Guillaume,

yup, that's exactly it. EMF Compare is based on a generic algorithm for
the metrics to determine objects' similarities... With specific objects
such as yours when the generic engine doesn't manage to properly match
the objects, isSimilar() is the way to go.

Laurent Goubet
Obeo

Guillaume Chatelet a
Re: [EMF Compare] Similarity in ordered list [message #621362 is a reply to message #484419] Mon, 07 September 2009 13:03 Go to previous message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
Ok, looking closer to the code, I understood I had to write my own
MatchEngine (extending from GenericMatchEngine) and override the
GenericMatchEngine#isSimilar(EObject obj1, EObject obj2) function.

Guillaume Chatelet wrote:

> Hello Laurent,

> I'd like to compare two objects, say o1 and o2. Those objects contain an
> EList<IMyObject>.

> The compare is pretty difficult because the lists might be shuffled and
> the object might change a lot.

> In order for the diff ordering to be efficient I need rules to ensure that
> two IMyObject are similar. Otherwise the diff algorithm will conclude with
> a lot of additions and deletions in the list. So I need to precise what
> makes two IMyObject similar or not. I already played with
> ReferencesCheck#shouldBeIgnored(EReference) and
> AttributesCheck#shouldBeIgnored(EAttribute) as you proposed but it's not
> enough. I need to compute intermediate metrics and maybe to give some
> attributes more importance than others.

> Do you think this is something that fits in EMF Compare's framework ? How
> can I do this ?

> Best regards,
> Guillaume
Re: [EMF Compare] Similarity in ordered list [message #621365 is a reply to message #484426] Mon, 07 September 2009 16:02 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050502010406050308060000
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi Guillaume,

yup, that's exactly it. EMF Compare is based on a generic algorithm for
the metrics to determine objects' similarities... With specific objects
such as yours when the generic engine doesn't manage to properly match
the objects, isSimilar() is the way to go.

Laurent Goubet
Obeo

Guillaume Chatelet a
Previous Topic:[EMF Compare] Similarity in ordered list
Next Topic:[EMF Compare] possible bug comparing resources
Goto Forum:
  


Current Time: Thu Feb 22 22:31:52 GMT 2024

Powered by FUDForum. Page generated in 0.02263 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top