src-gu/mir-reasoner/src/reasoner/GlobalReasoner.java
/** Returns an ordered list of taxon pairs between T1 and T2 for bottom-up traversals. */
Returns an ordered list of taxon pairs between T1 and T2 for bottom-up traversals.
Returns an ordered list of taxon pairs between T1 and T2 for bottom - up traversals .
private static List<TaxonPair> orderTaxonPairs(Taxonomy T1, Taxonomy T2){
		List<Taxon> T1OrderedTaxa = new LinkedList<Taxon>();
		List<Taxon> T2OrderedTaxa = new LinkedList<Taxon>();
		List<TaxonPair> sortedPairs   = new LinkedList<TaxonPair>();
		for (int i=T1.getHeight(); i>0; i--)
			for (Taxon t1 : T1.getAllTaxa())
				if (t1.getLevel() == i-1)
					T1OrderedTaxa.add(t1);
		for (int i=T2.getHeight(); i>0; i--)
			for (Taxon t2 : T2.getAllTaxa())
				if (t2.getLevel() == i-1)
					T2OrderedTaxa.add(t2);
		for (Taxon t1 : T1OrderedTaxa)
			for (Taxon t2 : T2OrderedTaxa)
				sortedPairs.add(new TaxonPair(t1, t2));
		return sortedPairs;
	}
private static List < TaxonPair > orderTaxonPairs ( Taxonomy T1 , Taxonomy T2 ) { List < Taxon > T1OrderedTaxa = new LinkedList < Taxon > ( ) ; List < Taxon > T2OrderedTaxa = new LinkedList < Taxon > ( ) ; List < TaxonPair > sortedPairs = new LinkedList < TaxonPair > ( ) ; for ( int i = T1 . getHeight ( ) ; i > 0 ; i -- ) for ( Taxon t1 : T1 . getAllTaxa ( ) ) if ( t1 . getLevel ( ) == i - 1 ) T1OrderedTaxa . add ( t1 ) ; for ( int i = T2 . getHeight ( ) ; i > 0 ; i -- ) for ( Taxon t2 : T2 . getAllTaxa ( ) ) if ( t2 . getLevel ( ) == i - 1 ) T2OrderedTaxa . add ( t2 ) ; for ( Taxon t1 : T1OrderedTaxa ) for ( Taxon t2 : T2OrderedTaxa ) sortedPairs . add ( new TaxonPair ( t1 , t2 ) ) ; return sortedPairs ; }
Returns an ordered list of taxon pairs between T1 and T2 for bottom-up traversals.
Returns an ordered list of taxon pairs between T1 and T2 for bottom - up traversals .
// order the T1 taxa by their level // order the T2 taxa by their level // create a list of taxon pairs sorted for bottom-up traversal