@@ -170,28 +170,6 @@ impl Bitv {
170
170
}
171
171
}
172
172
173
- /**
174
- * Calculates the union of two bitvectors
175
- *
176
- * Sets `self` to the union of `self` and `v1`. Both bitvectors must be
177
- * the same length. Returns `true` if `self` changed.
178
- */
179
- #[ inline]
180
- pub fn union ( & mut self , other : & Bitv ) -> bool {
181
- self . process ( other, |w1, w2| w1 | w2)
182
- }
183
-
184
- /**
185
- * Calculates the intersection of two bitvectors
186
- *
187
- * Sets `self` to the intersection of `self` and `v1`. Both bitvectors
188
- * must be the same length. Returns `true` if `self` changed.
189
- */
190
- #[ inline]
191
- pub fn intersect ( & mut self , other : & Bitv ) -> bool {
192
- self . process ( other, |w1, w2| w1 & w2)
193
- }
194
-
195
173
/// Retrieve the value at index `i`
196
174
#[ inline]
197
175
pub fn get ( & self , i : uint ) -> bool {
@@ -229,6 +207,28 @@ impl Bitv {
229
207
for w in self . storage . mut_iter ( ) { * w = !* w; }
230
208
}
231
209
210
+ /**
211
+ * Calculates the union of two bitvectors
212
+ *
213
+ * Sets `self` to the union of `self` and `v1`. Both bitvectors must be
214
+ * the same length. Returns `true` if `self` changed.
215
+ */
216
+ #[ inline]
217
+ pub fn union ( & mut self , other : & Bitv ) -> bool {
218
+ self . process ( other, |w1, w2| w1 | w2)
219
+ }
220
+
221
+ /**
222
+ * Calculates the intersection of two bitvectors
223
+ *
224
+ * Sets `self` to the intersection of `self` and `v1`. Both bitvectors
225
+ * must be the same length. Returns `true` if `self` changed.
226
+ */
227
+ #[ inline]
228
+ pub fn intersect ( & mut self , other : & Bitv ) -> bool {
229
+ self . process ( other, |w1, w2| w1 & w2)
230
+ }
231
+
232
232
/**
233
233
* Calculate the difference between two bitvectors
234
234
*
0 commit comments