X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Ftools%2FSupportCount.java;h=283668ca09cbdd254f74f6e89f0cdc0f77f0a7e3;hb=01d681ced8f186561a3dd76715d950bd0eabd82d;hp=5c8e924b4448ac12314856b912ddeae9f6f03467;hpb=f3578c8bca780191d23d36d3791d2ec2c0bf38ad;p=jalview.git diff --git a/forester/java/src/org/forester/tools/SupportCount.java b/forester/java/src/org/forester/tools/SupportCount.java index 5c8e924..283668c 100644 --- a/forester/java/src/org/forester/tools/SupportCount.java +++ b/forester/java/src/org/forester/tools/SupportCount.java @@ -21,7 +21,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.tools; @@ -64,7 +64,7 @@ public final class SupportCount { phylogeny.reRoot( phylogeny.getNode( child0_name ) ); evaluator_phylogeny.reRoot( evaluator_phylogeny.getNode( child0_name ) ); } - final Map> phylogeny_external_names_per_node = SupportCount + final Map> phylogeny_external_names_per_node = SupportCount .extractExternalNamesPerNode( phylogeny ); return ( SupportCount.compare( phylogeny, evaluator_phylogeny, @@ -97,7 +97,7 @@ public final class SupportCount { */ private static double compare( final Phylogeny phylogeny, final Phylogeny evaluator_phylogeny, - final Map> phylogeny_external_names_per_node, + final Map> phylogeny_external_names_per_node, final boolean update_support_in_phylogeny, final double similarity_threshold ) { int matching_branches = 0; @@ -114,7 +114,7 @@ public final class SupportCount { for( final Object element : evaluator_phylogeny_it.next().getAllExternalDescendants() ) { c1.add( ( ( PhylogenyNode ) element ).getName() ); } - for( final Integer id : phylogeny_external_names_per_node.keySet() ) { + for( final Long id : phylogeny_external_names_per_node.keySet() ) { final List c2 = phylogeny_external_names_per_node.get( id ); if ( ( c2.size() == c1.size() ) && c2.containsAll( c1 ) ) { if ( c2.size() > 1 ) { @@ -181,7 +181,7 @@ public final class SupportCount { } final String child0_name = phylogeny.getFirstExternalNode().getName(); phylogeny.reRoot( phylogeny.getNode( child0_name ) ); - final Map> phylogeny_external_names_per_node = SupportCount + final Map> phylogeny_external_names_per_node = SupportCount .extractExternalNamesPerNode( phylogeny ); if ( verbose ) { System.out.println(); @@ -239,14 +239,14 @@ public final class SupportCount { return evaluator_phylogenies_above_threshold; } - private static Map> extractExternalNamesPerNode( final Phylogeny phylogeny ) + private static Map> extractExternalNamesPerNode( final Phylogeny phylogeny ) throws NoSuchElementException { - final HashMap> phylogeny_external_names_per_node = new HashMap>(); + final HashMap> phylogeny_external_names_per_node = new HashMap>(); for( final PhylogenyNodeIterator it = phylogeny.iteratorPostorder(); it.hasNext(); ) { final PhylogenyNode n = it.next(); final List l = n.getAllExternalDescendants(); final ArrayList c = new ArrayList(); - phylogeny_external_names_per_node.put( new Integer( n.getId() ), c ); + phylogeny_external_names_per_node.put( new Long( n.getId() ), c ); for( final PhylogenyNode phylogenyNode : l ) { c.add( phylogenyNode.getName() ); }