Compute the symmetric difference of the two sets, in place. This computes the symmetric difference of two interval sets. This removes all elements in this set that are also in the given set, but also adds all elements from the given set that aren't in this set. That is, the set will contain all elements in either set, but will not contain any elements that are in both sets.
(&mut self, other: &IntervalSet<I>)
| 227 | /// set. That is, the set will contain all elements in either set, |
| 228 | /// but will not contain any elements that are in both sets. |
| 229 | pub fn symmetric_difference(&mut self, other: &IntervalSet<I>) { |
| 230 | // TODO(burntsushi): Fix this so that it amortizes allocation. |
| 231 | let mut intersection = self.clone(); |
| 232 | intersection.intersect(other); |
| 233 | self.union(other); |
| 234 | self.difference(&intersection); |
| 235 | } |
| 236 | |
| 237 | /// Negate this interval set. |
| 238 | /// |
nothing calls this directly
no test coverage detected