From e30ae9c3c2de3f5a27028963205475f7e7ce420a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr>
Date: Wed, 9 Sep 2015 21:38:49 +0000
Subject: [PATCH] - fixed incompleteness + bug in inverse()

---
 .../inrialpes/exmo/align/impl/edoal/EDOALCell.java | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/fr/inrialpes/exmo/align/impl/edoal/EDOALCell.java b/src/fr/inrialpes/exmo/align/impl/edoal/EDOALCell.java
index 330d34a6..b6099207 100644
--- a/src/fr/inrialpes/exmo/align/impl/edoal/EDOALCell.java
+++ b/src/fr/inrialpes/exmo/align/impl/edoal/EDOALCell.java
@@ -114,12 +114,18 @@ public class EDOALCell extends BasicCell {
 	return linkkeys;
     }
 
-    public Cell inverse() throws AlignmentException {
+    public EDOALCell inverse() throws AlignmentException {
 	EDOALCell invcell = new EDOALCell( (String)null, (Expression)object2, (Expression)object1, relation.inverse(), strength );
-	for ( Transformation trsf : transformations ) {
-	    invcell.addTransformation( trsf.inverse() );
+	if ( transformations != null ) {
+	    for ( Transformation trsf : transformations ) {
+		invcell.addTransformation( trsf.inverse() );
+	    }
+	}
+	if ( linkkeys != null ) {
+	    for ( Linkkey lk : linkkeys ) {
+		invcell.addLinkkey( lk.inverse() );
+	    }
 	}
-	// The same should be done for the measure
 	return invcell;
     }
 
-- 
GitLab