From: cmzmasek@gmail.com Date: Sat, 8 Mar 2014 02:23:47 +0000 (+0000) Subject: cleanup X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4c5715c2e8dd072a230cd3e493594a0f45655c55;p=jalview.git cleanup --- diff --git a/forester/java/src/org/forester/evoinference/distance/S.java b/forester/java/src/org/forester/evoinference/distance/S.java index 4452ba3..1ea6f9b 100644 --- a/forester/java/src/org/forester/evoinference/distance/S.java +++ b/forester/java/src/org/forester/evoinference/distance/S.java @@ -20,14 +20,9 @@ public class S { _data = new ArrayList>>(); } - void initialize( final BasicSymmetricalDistanceMatrix d ) { - for( int j = 0; j < d.getSize(); ++j ) { - final TreeMap> map = new TreeMap>(); - _data.add( map ); - for( int i = 0; i < j; ++i ) { - addValue( d.getValues()[ i ][ j ], i, map ); - } - } + void addValue( final double key, final int value, final int j ) { + final SortedMap> m = _data.get( j ); + addValue( key, value, m ); } SortedMap> getS( final int j ) { @@ -38,14 +33,19 @@ public class S { return _data.get( j ).entrySet(); } - void addValue( double key, int value, int j ) { - SortedMap> m = _data.get( j ); - addValue( key, value, m ); + void initialize( final BasicSymmetricalDistanceMatrix d ) { + for( int j = 0; j < d.getSize(); ++j ) { + final TreeMap> map = new TreeMap>(); + _data.add( map ); + for( int i = 0; i < j; ++i ) { + addValue( d.getValues()[ i ][ j ], i, map ); + } + } } - static void addValue( double key, int value, SortedMap> m ) { + static void addValue( final double key, final int value, final SortedMap> m ) { if ( !m.containsKey( key ) ) { - TreeSet x = new TreeSet(); + final TreeSet x = new TreeSet(); x.add( value ); m.put( key, x ); }