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 ) );
}
.extractExternalNamesPerNode( phylogeny );
return ( SupportCount.compare( phylogeny,
evaluator_phylogeny,
.extractExternalNamesPerNode( phylogeny );
return ( SupportCount.compare( phylogeny,
evaluator_phylogeny,
*/
private static double compare( final Phylogeny phylogeny,
final Phylogeny evaluator_phylogeny,
*/
private static double compare( final Phylogeny phylogeny,
final Phylogeny evaluator_phylogeny,
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;
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() );
}
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 ) {
}
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 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>();