inprogress
[jalview.git] / forester / java / src / org / forester / evoinference / distance / S.java
index f1d94db..b510a61 100644 (file)
@@ -47,7 +47,7 @@ public final class S {
                 addPairing( ( int ) ( FACTOR * d.getValues()[ i ][ j ] ), i, map );
             }
         }
-        System.out.println( toString() );
+        //System.out.println( toString() );
     }
 
     final public void initialize( final int size ) {
@@ -73,20 +73,20 @@ public final class S {
                 throw new IllegalArgumentException( "key " + key + " (->" + value + ") does not exist for row " + j );
             }
         }
-        //        if ( x.size() == 1 ) {
-        //            if ( DEBUG ) {
-        //                if ( !x.contains( value ) ) {
-        //                    System.out.println();
-        //                    System.out
-        //                            .println( "________________________________________________________________________________________" );
-        //                    System.out.println( toString() );
-        //                    throw new IllegalArgumentException( "pairing " + key + "->" + value + " does not exist for row "
-        //                            + j );
-        //                }
-        //            }
-        //            m.remove( key );
-        //        }
-        else if ( x.size() >= 1 ) {
+        if ( x.size() == 1 ) {
+            if ( DEBUG ) {
+                if ( !x.contains( value ) ) {
+                    System.out.println();
+                    System.out
+                            .println( "________________________________________________________________________________________" );
+                    System.out.println( toString() );
+                    throw new IllegalArgumentException( "pairing " + key + "->" + value + " does not exist for row "
+                            + j );
+                }
+            }
+            m.remove( key );
+        }
+        else if ( x.size() > 1 ) {
             if ( DEBUG ) {
                 if ( !x.remove( value ) ) {
                     throw new IllegalArgumentException( "pairing " + key + "->" + value
@@ -114,7 +114,7 @@ public final class S {
 
     @Override
     final public String toString() {
-        final DecimalFormat df = new DecimalFormat( "0.0000" );
+        final DecimalFormat df = new DecimalFormat( "0.000000" );
         final StringBuilder sb = new StringBuilder();
         for( int j = 0; j < size(); ++j ) {
             sb.append( j );