@@ -723,30 +723,6 @@ impl BitvSet {
723
723
bitv. nbits = trunc_len * uint:: BITS ;
724
724
}
725
725
726
- /// Union in-place with the specified other bit vector
727
- #[ inline]
728
- pub fn union_with ( & mut self , other : & BitvSet ) {
729
- self . other_op ( other, |w1, w2| w1 | w2) ;
730
- }
731
-
732
- /// Intersect in-place with the specified other bit vector
733
- #[ inline]
734
- pub fn intersect_with ( & mut self , other : & BitvSet ) {
735
- self . other_op ( other, |w1, w2| w1 & w2) ;
736
- }
737
-
738
- /// Difference in-place with the specified other bit vector
739
- #[ inline]
740
- pub fn difference_with ( & mut self , other : & BitvSet ) {
741
- self . other_op ( other, |w1, w2| w1 & !w2) ;
742
- }
743
-
744
- /// Symmetric difference in-place with the specified other bit vector
745
- #[ inline]
746
- pub fn symmetric_difference_with ( & mut self , other : & BitvSet ) {
747
- self . other_op ( other, |w1, w2| w1 ^ w2) ;
748
- }
749
-
750
726
/// Iterator over each uint stored in the BitvSet
751
727
#[ inline]
752
728
pub fn iter < ' a > ( & ' a self ) -> BitPositions < ' a > {
@@ -801,6 +777,30 @@ impl BitvSet {
801
777
next_idx : 0
802
778
}
803
779
}
780
+
781
+ /// Union in-place with the specified other bit vector
782
+ #[ inline]
783
+ pub fn union_with ( & mut self , other : & BitvSet ) {
784
+ self . other_op ( other, |w1, w2| w1 | w2) ;
785
+ }
786
+
787
+ /// Intersect in-place with the specified other bit vector
788
+ #[ inline]
789
+ pub fn intersect_with ( & mut self , other : & BitvSet ) {
790
+ self . other_op ( other, |w1, w2| w1 & w2) ;
791
+ }
792
+
793
+ /// Difference in-place with the specified other bit vector
794
+ #[ inline]
795
+ pub fn difference_with ( & mut self , other : & BitvSet ) {
796
+ self . other_op ( other, |w1, w2| w1 & !w2) ;
797
+ }
798
+
799
+ /// Symmetric difference in-place with the specified other bit vector
800
+ #[ inline]
801
+ pub fn symmetric_difference_with ( & mut self , other : & BitvSet ) {
802
+ self . other_op ( other, |w1, w2| w1 ^ w2) ;
803
+ }
804
804
}
805
805
806
806
impl fmt:: Show for BitvSet {
0 commit comments