org.eclipse.emf.compare.match.statistic.similarity
Class StructureSimilarity

java.lang.Object
  extended by org.eclipse.emf.compare.match.statistic.similarity.StructureSimilarity

public final class StructureSimilarity
extends java.lang.Object

Utilities for structure comparison.


Method Summary
static double relationsSimilarityMetric(org.eclipse.emf.ecore.EObject obj1, org.eclipse.emf.ecore.EObject obj2, MetamodelFilter filter)
          This method returns a double comprised between 0 and 1 representing the relations similarities of the 2 EObjects. - 1 means the 2 objects surroundings are very similar - 0 means the 2 objects surroundings are very different.
static double typeSimilarityMetric(org.eclipse.emf.ecore.EObject obj1, org.eclipse.emf.ecore.EObject obj2)
          This method returns a double comprised between 0 and 1 representing the type similarities of the 2 EObjects. - 1 means the 2 objects types are very similar - 0 means the 2 objects types are very differents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

relationsSimilarityMetric

public static double relationsSimilarityMetric(org.eclipse.emf.ecore.EObject obj1,
                                               org.eclipse.emf.ecore.EObject obj2,
                                               MetamodelFilter filter)
                                        throws FactoryException
This method returns a double comprised between 0 and 1 representing the relations similarities of the 2 EObjects. - 1 means the 2 objects surroundings are very similar - 0 means the 2 objects surroundings are very different.

Parameters:
obj1 - First of the two EObjects to compare.
obj2 - Second of the two EObjects to compare.
filter - Allows filtering of the pertinent features.
Returns:
A double representing the relation similarity (0 < value < 1).
Throws:
FactoryException - Thrown if we cannot compute the similarity.

typeSimilarityMetric

public static double typeSimilarityMetric(org.eclipse.emf.ecore.EObject obj1,
                                          org.eclipse.emf.ecore.EObject obj2)
                                   throws FactoryException
This method returns a double comprised between 0 and 1 representing the type similarities of the 2 EObjects. - 1 means the 2 objects types are very similar - 0 means the 2 objects types are very differents.

Parameters:
obj1 - First of the two EObjects to compare.
obj2 - Second of the two EObjects to compare.
Returns:
Returns a double representing the type similarity of the 2 objects (0 < value < 1).
Throws:
FactoryException - Thrown if we cannot compute the similarity.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.