Function box_intersect_ze::intersect_ze[][src]

pub fn intersect_ze<B, ID, R>(
    a: &BBoxSet<B, ID>,
    b: &BBoxSet<B, ID>,
    out: &mut Vec<(ID, ID)>,
    rand: &mut R
) where
    B: BBox,
    B::Num: PartialOrd + HasInfinity,
    ID: PartialOrd + Copy,
    R: Rng

Finds all intersections between boxes in a and b using Zomorodian and Edelsbrunner’s hybrid algorithm (streamed segment trees pruned with a cutoff).

  • a and b may be either the same or distinct BBoxSets and must be sorted before calling.
  • out will contain pairs of IDs of intersecting boxes. Choose capacity according to the number of intersections you expect to avoid resizing.
  • rand must be a random number generator implementing the Rng trait. (used for approximate median selection)