git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
inprogress
[jalview.git]
/
forester
/
java
/
src
/
org
/
forester
/
tools
/
SupportCount.java
diff --git
a/forester/java/src/org/forester/tools/SupportCount.java
b/forester/java/src/org/forester/tools/SupportCount.java
index
e554d4e
..
283668c
100644
(file)
--- 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
// 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;
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 ) );
}
phylogeny.reRoot( phylogeny.getNode( child0_name ) );
evaluator_phylogeny.reRoot( evaluator_phylogeny.getNode( child0_name ) );
}
- final Map<Integer, ArrayList<String>> phylogeny_external_names_per_node = SupportCount
+ final Map<Long, ArrayList<String>> phylogeny_external_names_per_node = SupportCount
.extractExternalNamesPerNode( phylogeny );
return ( SupportCount.compare( phylogeny,
evaluator_phylogeny,
.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,
*/
private static double compare( final Phylogeny phylogeny,
final Phylogeny evaluator_phylogeny,
- final Map<Integer, ArrayList<String>> phylogeny_external_names_per_node,
+ final Map<Long, ArrayList<String>> phylogeny_external_names_per_node,
final boolean update_support_in_phylogeny,
final double similarity_threshold ) {
int matching_branches = 0;
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 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<String> c2 = phylogeny_external_names_per_node.get( id );
if ( ( c2.size() == c1.size() ) && c2.containsAll( c1 ) ) {
if ( c2.size() > 1 ) {
final List<String> 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 String child0_name = phylogeny.getFirstExternalNode().getName();
phylogeny.reRoot( phylogeny.getNode( child0_name ) );
- final Map<Integer, ArrayList<String>> phylogeny_external_names_per_node = SupportCount
+ final Map<Long, ArrayList<String>> phylogeny_external_names_per_node = SupportCount
.extractExternalNamesPerNode( phylogeny );
if ( verbose ) {
System.out.println();
.extractExternalNamesPerNode( phylogeny );
if ( verbose ) {
System.out.println();
@@
-204,6
+204,9
@@
public final class SupportCount {
// comparison if
// phylos are saved
// to file.
// comparison if
// phylos are saved
// to file.
+ evaluator_phylogeny.externalNodesHaveChanged();
+ evaluator_phylogeny.clearHashIdToNodeMap();
+ evaluator_phylogeny.recalculateNumberOfExternalDescendants( true );
}
final double s = SupportCount.compare( phylogeny,
evaluator_phylogenies[ i ],
}
final double s = SupportCount.compare( phylogeny,
evaluator_phylogenies[ i ],
@@
-236,14
+239,14
@@
public final class SupportCount {
return evaluator_phylogenies_above_threshold;
}
return evaluator_phylogenies_above_threshold;
}
- private static Map<Integer, ArrayList<String>> extractExternalNamesPerNode( final Phylogeny phylogeny )
+ private static Map<Long, ArrayList<String>> extractExternalNamesPerNode( final Phylogeny phylogeny )
throws NoSuchElementException {
throws NoSuchElementException {
- final HashMap<Integer, ArrayList<String>> phylogeny_external_names_per_node = new HashMap<Integer, ArrayList<String>>();
+ final HashMap<Long, ArrayList<String>> phylogeny_external_names_per_node = new HashMap<Long, ArrayList<String>>();
for( final PhylogenyNodeIterator it = phylogeny.iteratorPostorder(); it.hasNext(); ) {
final PhylogenyNode n = it.next();
final List<PhylogenyNode> l = n.getAllExternalDescendants();
final ArrayList<String> c = new ArrayList<String>();
for( final PhylogenyNodeIterator it = phylogeny.iteratorPostorder(); it.hasNext(); ) {
final PhylogenyNode n = it.next();
final List<PhylogenyNode> l = n.getAllExternalDescendants();
final ArrayList<String> c = new ArrayList<String>();
- 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() );
}
for( final PhylogenyNode phylogenyNode : l ) {
c.add( phylogenyNode.getName() );
}