Index: cpp/frams/model/similarity/EMD/emd.c
===================================================================
--- cpp/frams/model/similarity/EMD/emd.c	(revision 1049)
+++ cpp/frams/model/similarity/EMD/emd.c	(revision 1050)
@@ -54,6 +54,6 @@
 /* GLOBAL VARIABLE DECLARATION */
 static int _n1, _n2;                          /* SIGNATURES SIZES */
-static float _C[MAX_SIG_SIZE1][MAX_SIG_SIZE1];/* THE COST MATRIX */
-static node2_t _X[MAX_SIG_SIZE1*2];            /* THE BASIC VARIABLES VECTOR */
+static float _CM[MAX_SIG_SIZE1][MAX_SIG_SIZE1];/* THE COST MATRIX */
+static node2_t _XV[MAX_SIG_SIZE1*2];            /* THE BASIC VARIABLES VECTOR */
 /* VARIABLES TO HANDLE _X EFFICIENTLY */
 static node2_t *_EndX, *_EnterX;
@@ -146,5 +146,5 @@
   if (Flow != NULL)
     FlowP = Flow;
-  for(XP=_X; XP < _EndX; XP++)
+  for(XP=_XV; XP < _EndX; XP++)
     {
       if (XP == _EnterX)  /* _EnterX IS THE EMPTY SLOT */
@@ -156,5 +156,5 @@
 	continue;
 
-      totalCost += (double)XP->val * _C[XP->i][XP->j];
+      totalCost += (double)XP->val * _CM[XP->i][XP->j];
       if (Flow != NULL)
 	{
@@ -205,7 +205,7 @@
     for(j=0, P2=Signature2->Features; j < _n2; j++, P2++) 
       {
-	_C[i][j] = Dist(P1, P2);
-	if (_C[i][j] > _maxC)
-	  _maxC = _C[i][j];
+	_CM[i][j] = Dist(P1, P2);
+	if (_CM[i][j] > _maxC)
+	  _maxC = _CM[i][j];
       }
 	
@@ -233,5 +233,5 @@
 	{
 	  for (j=0; j < _n2; j++)
-	    _C[_n1][j] = 0;
+	    _CM[_n1][j] = 0;
 	  S[_n1] = -diff;
 	  _RowsX[_n1] = NULL;
@@ -241,5 +241,5 @@
 	{
 	  for (i=0; i < _n1; i++)
-	    _C[i][_n2] = 0;
+	    _CM[i][_n2] = 0;
 	  D[_n2] = diff;
 	  _ColsX[_n2] = NULL;
@@ -252,5 +252,5 @@
     for (j=0; j < _n2; j++)
 	_IsX[i][j] = 0;
-  _EndX = _X;
+  _EndX = _XV;
    
   _maxW = sSum > dSum ? sSum : dSum;
@@ -345,5 +345,5 @@
 		    {
 		      /* COMPUTE U[i] */
-		      CurU->val = _C[i][j] - CurV->val;
+		      CurU->val = _CM[i][j] - CurV->val;
 		      /* ...AND ADD IT TO THE MARKED LIST */
 		      PrevU->Next = CurU->Next;
@@ -375,5 +375,5 @@
 		    {
 		      /* COMPUTE V[j] */
-		      CurV->val = _C[i][j] - CurU->val;
+		      CurV->val = _CM[i][j] - CurU->val;
 		      /* ...AND ADD IT TO THE MARKED LIST */
 		      PrevV->Next = CurV->Next;
@@ -417,5 +417,5 @@
       if (! _IsX[i][j])
 	{
-	  delta = _C[i][j] - U[i].val - V[j].val;
+	  delta = _CM[i][j] - U[i].val - V[j].val;
 	  if (deltaMin > delta)
 	    {
@@ -540,5 +540,5 @@
   CurX = Loop;
   NewX = *CurX = _EnterX;
-  IsUsed[_EnterX-_X] = 1;
+  IsUsed[_EnterX-_XV] = 1;
   steps = 1;
 
@@ -549,5 +549,5 @@
 	  /* FIND AN UNUSED X IN THE ROW */
 	  NewX = _RowsX[NewX->i];
-	  while (NewX != NULL && IsUsed[NewX-_X])
+	  while (NewX != NULL && IsUsed[NewX-_XV])
 	    NewX = NewX->NextC;
 	}
@@ -556,5 +556,5 @@
 	  /* FIND AN UNUSED X IN THE COLUMN, OR THE ENTERING X */
 	  NewX = _ColsX[NewX->j];
-	  while (NewX != NULL && IsUsed[NewX-_X] && NewX != _EnterX)
+	  while (NewX != NULL && IsUsed[NewX-_XV] && NewX != _EnterX)
 	    NewX = NewX->NextR;
 	  if (NewX == _EnterX)
@@ -566,5 +566,5 @@
 	 /* ADD X TO THE LOOP */
 	 *++CurX = NewX;
-	 IsUsed[NewX-_X] = 1;
+	 IsUsed[NewX-_XV] = 1;
 	 steps++;
 #if DEBUG_LEVEL > 3
@@ -584,9 +584,9 @@
 		 else
 		   NewX = NewX->NextC;
-	       } while (NewX != NULL && IsUsed[NewX-_X]);
+	       } while (NewX != NULL && IsUsed[NewX-_XV]);
 	     
 	     if (NewX == NULL)
 	       {
-		 IsUsed[*CurX-_X] = 0;
+		 IsUsed[*CurX-_XV] = 0;
 		 CurX--;
 		 steps--;
@@ -598,7 +598,7 @@
 		steps, NewX->i, NewX->j);    
 #endif
-           IsUsed[*CurX-_X] = 0;
+           IsUsed[*CurX-_XV] = 0;
 	   *CurX = NewX;
-	   IsUsed[NewX-_X] = 1;
+	   IsUsed[NewX-_XV] = 1;
        }     
     } while(CurX >= Loop);
@@ -659,5 +659,5 @@
       {
 	float v;
-	v = _C[i][j];
+	v = _CM[i][j];
 	if (Ur[i].val <= v)
 	  Ur[i].val = v;
@@ -669,5 +669,5 @@
   for(i=0; i < _n1 ; i++)
     for(j=0; j < _n2 ; j++)
-      Delta[i][j] = _C[i][j] - Ur[i].val - Vr[j].val;
+      Delta[i][j] = _CM[i][j] - Ur[i].val - Vr[j].val;
 
   /* FIND THE BASIC VARIABLES */
@@ -727,5 +727,5 @@
 	      int j;
 	      j = CurV->i;
-	      if (CurV->val == _C[minI][j])  /* COLUMN j NEEDS UPDATING */
+	      if (CurV->val == _CM[minI][j])  /* COLUMN j NEEDS UPDATING */
 		{
 		  /* FIND THE NEW MAXIMUM VALUE IN THE COLUMN */
@@ -736,6 +736,6 @@
 		      int i;
 		      i = CurU->i;
-		      if (CurV->val <= _C[i][j])
-			CurV->val = _C[i][j];
+		      if (CurV->val <= _CM[i][j])
+			CurV->val = _CM[i][j];
 		    }
 		  
@@ -754,5 +754,5 @@
 	      int i;
 	      i = CurU->i;
-	      if (CurU->val == _C[i][minJ])  /* ROW i NEEDS UPDATING */
+	      if (CurU->val == _CM[i][minJ])  /* ROW i NEEDS UPDATING */
 		{
 		  /* FIND THE NEW MAXIMUM VALUE IN THE ROW */
@@ -763,6 +763,6 @@
 		      int j;
 		      j = CurV->i;
-		      if(CurU->val <= _C[i][j])
-			CurU->val = _C[i][j];
+		      if(CurU->val <= _CM[i][j])
+			CurU->val = _CM[i][j];
 		    }
 		  
