@@ -413,7 +413,7 @@ impl Bitv {
413
413
}
414
414
415
415
#[ inline]
416
- pub fn rev_liter < ' a > ( & ' a self ) -> Invert < BitvIterator < ' a > > {
416
+ pub fn rev_iter < ' a > ( & ' a self ) -> Invert < BitvIterator < ' a > > {
417
417
self . iter ( ) . invert ( )
418
418
}
419
419
@@ -723,38 +723,38 @@ impl BitvSet {
723
723
}
724
724
725
725
pub fn difference ( & self , other : & BitvSet , f: |& uint| -> bool) -> bool {
726
- for ( i, w1, w2) in self . common_iter ( other) {
726
+ for ( i, w1, w2) in self . commons ( other) {
727
727
if !iterate_bits ( i, w1 & !w2, |b| f ( & b) ) {
728
728
return false
729
729
}
730
730
} ;
731
731
/* everything we have that they don't also shows up */
732
- self . outlier_iter ( other) . advance ( |( mine, i, w) |
732
+ self . outliers ( other) . advance ( |( mine, i, w) |
733
733
!mine || iterate_bits ( i, w, |b| f ( & b) )
734
734
)
735
735
}
736
736
737
737
pub fn symmetric_difference ( & self , other : & BitvSet , f: |& uint| -> bool)
738
738
-> bool {
739
- for ( i, w1, w2) in self . common_iter ( other) {
739
+ for ( i, w1, w2) in self . commons ( other) {
740
740
if !iterate_bits ( i, w1 ^ w2, |b| f ( & b) ) {
741
741
return false
742
742
}
743
743
} ;
744
- self . outlier_iter ( other) . advance ( |( _, i, w) | iterate_bits ( i, w, |b| f ( & b) ) )
744
+ self . outliers ( other) . advance ( |( _, i, w) | iterate_bits ( i, w, |b| f ( & b) ) )
745
745
}
746
746
747
747
pub fn intersection ( & self , other : & BitvSet , f: |& uint| -> bool) -> bool {
748
- self . common_iter ( other) . advance ( |( i, w1, w2) | iterate_bits ( i, w1 & w2, |b| f ( & b) ) )
748
+ self . commons ( other) . advance ( |( i, w1, w2) | iterate_bits ( i, w1 & w2, |b| f ( & b) ) )
749
749
}
750
750
751
751
pub fn union ( & self , other : & BitvSet , f: |& uint| -> bool) -> bool {
752
- for ( i, w1, w2) in self . common_iter ( other) {
752
+ for ( i, w1, w2) in self . commons ( other) {
753
753
if !iterate_bits ( i, w1 | w2, |b| f ( & b) ) {
754
754
return false
755
755
}
756
756
} ;
757
- self . outlier_iter ( other) . advance ( |( _, i, w) | iterate_bits ( i, w, |b| f ( & b) ) )
757
+ self . outliers ( other) . advance ( |( _, i, w) | iterate_bits ( i, w, |b| f ( & b) ) )
758
758
}
759
759
}
760
760
@@ -763,12 +763,12 @@ impl cmp::Eq for BitvSet {
763
763
if self . size != other. size {
764
764
return false ;
765
765
}
766
- for ( _, w1, w2) in self . common_iter ( other) {
766
+ for ( _, w1, w2) in self . commons ( other) {
767
767
if w1 != w2 {
768
768
return false ;
769
769
}
770
770
}
771
- for ( _, _, w) in self . outlier_iter ( other) {
771
+ for ( _, _, w) in self . outliers ( other) {
772
772
if w != 0 {
773
773
return false ;
774
774
}
@@ -803,15 +803,15 @@ impl Set<uint> for BitvSet {
803
803
}
804
804
805
805
fn is_subset ( & self , other : & BitvSet ) -> bool {
806
- for ( _, w1, w2) in self . common_iter ( other) {
806
+ for ( _, w1, w2) in self . commons ( other) {
807
807
if w1 & w2 != w1 {
808
808
return false ;
809
809
}
810
810
}
811
811
/* If anything is not ours, then everything is not ours so we're
812
812
definitely a subset in that case. Otherwise if there's any stray
813
813
ones that 'other' doesn't have, we're not a subset. */
814
- for ( mine, _, w) in self . outlier_iter ( other) {
814
+ for ( mine, _, w) in self . outliers ( other) {
815
815
if !mine {
816
816
return true ;
817
817
} else if w != 0 {
@@ -865,7 +865,7 @@ impl BitvSet {
865
865
/// both have in common. The three yielded arguments are (bit location,
866
866
/// w1, w2) where the bit location is the number of bits offset so far,
867
867
/// and w1/w2 are the words coming from the two vectors self, other.
868
- fn common_iter < ' a > ( & ' a self , other : & ' a BitvSet )
868
+ fn commons < ' a > ( & ' a self , other : & ' a BitvSet )
869
869
-> Map < ' static , ( ( uint , & ' a uint ) , & ' a ~[ uint ] ) , ( uint , uint , uint ) ,
870
870
Zip < Enumerate < vec:: VecIterator < ' a , uint > > , Repeat < & ' a ~[ uint ] > > > {
871
871
let min = num:: min ( self . bitv . storage . len ( ) , other. bitv . storage . len ( ) ) ;
@@ -881,7 +881,7 @@ impl BitvSet {
881
881
/// The yielded arguments are a `bool`, the bit offset, and a word. The `bool`
882
882
/// is true if the word comes from `self`, and `false` if it comes from
883
883
/// `other`.
884
- fn outlier_iter < ' a > ( & ' a self , other : & ' a BitvSet )
884
+ fn outliers < ' a > ( & ' a self , other : & ' a BitvSet )
885
885
-> Map < ' static , ( ( uint , & ' a uint ) , uint ) , ( bool , uint , uint ) ,
886
886
Zip < Enumerate < vec:: VecIterator < ' a , uint > > , Repeat < uint > > > {
887
887
let slen = self . bitv . storage . len ( ) ;
0 commit comments