@@ -107,7 +107,7 @@ impl<T:Debug+PartialEq> TransitiveRelation<T> {
107
107
///
108
108
/// Examples are probably clearer than any prose I could write
109
109
/// (there are corresponding tests below, btw). In each case,
110
- /// the query is `best_upper_bound (a, b)`:
110
+ /// the query is `postdom_upper_bound (a, b)`:
111
111
///
112
112
/// ```
113
113
/// // returns Some(x), which is also LUB
@@ -127,7 +127,7 @@ impl<T:Debug+PartialEq> TransitiveRelation<T> {
127
127
/// a -> a1
128
128
/// b -> b1
129
129
/// ```
130
- pub fn best_upper_bound ( & self , a : & T , b : & T ) -> Option < & T > {
130
+ pub fn postdom_upper_bound ( & self , a : & T , b : & T ) -> Option < & T > {
131
131
let mut mubs = self . minimal_upper_bounds ( a, b) ;
132
132
loop {
133
133
match mubs. len ( ) {
@@ -422,7 +422,7 @@ fn mubs_best_choice_scc() {
422
422
}
423
423
424
424
#[ test]
425
- fn bub_crisscross ( ) {
425
+ fn pdub_crisscross ( ) {
426
426
// diagonal edges run left-to-right
427
427
// a -> a1 -> x
428
428
// \/ ^
@@ -438,11 +438,11 @@ fn bub_crisscross() {
438
438
relation. add ( "b1" , "x" ) ;
439
439
440
440
assert_eq ! ( relation. minimal_upper_bounds( & "a" , & "b" ) , vec![ & "a1" , & "b1" ] ) ;
441
- assert_eq ! ( relation. best_upper_bound ( & "a" , & "b" ) , Some ( & "x" ) ) ;
441
+ assert_eq ! ( relation. postdom_upper_bound ( & "a" , & "b" ) , Some ( & "x" ) ) ;
442
442
}
443
443
444
444
#[ test]
445
- fn bub_crisscross_more ( ) {
445
+ fn pdub_crisscross_more ( ) {
446
446
// diagonal edges run left-to-right
447
447
// a -> a1 -> a2 -> a3 -> x
448
448
// \/ \/ ^
@@ -467,11 +467,11 @@ fn bub_crisscross_more() {
467
467
468
468
assert_eq ! ( relation. minimal_upper_bounds( & "a" , & "b" ) , vec![ & "a1" , & "b1" ] ) ;
469
469
assert_eq ! ( relation. minimal_upper_bounds( & "a1" , & "b1" ) , vec![ & "a2" , & "b2" ] ) ;
470
- assert_eq ! ( relation. best_upper_bound ( & "a" , & "b" ) , Some ( & "x" ) ) ;
470
+ assert_eq ! ( relation. postdom_upper_bound ( & "a" , & "b" ) , Some ( & "x" ) ) ;
471
471
}
472
472
473
473
#[ test]
474
- fn bub_lub ( ) {
474
+ fn pdub_lub ( ) {
475
475
// a -> a1 -> x
476
476
// ^
477
477
// |
@@ -484,7 +484,7 @@ fn bub_lub() {
484
484
relation. add ( "b1" , "x" ) ;
485
485
486
486
assert_eq ! ( relation. minimal_upper_bounds( & "a" , & "b" ) , vec![ & "x" ] ) ;
487
- assert_eq ! ( relation. best_upper_bound ( & "a" , & "b" ) , Some ( & "x" ) ) ;
487
+ assert_eq ! ( relation. postdom_upper_bound ( & "a" , & "b" ) , Some ( & "x" ) ) ;
488
488
}
489
489
490
490
#[ test]
0 commit comments