Function box_intersect_ze::internals::hybrid [−][src]
pub fn hybrid<B, ID, R, const CUTOFF: usize>(
intervals: &BBoxSet<B, ID>,
points: &BBoxSet<B, ID>,
lo: B::Num,
hi: B::Num,
dim: usize,
out: &mut Vec<(ID, ID)>,
rand: &mut R
) where
B: BBox,
ID: PartialOrd + Copy,
B::Num: PartialOrd + HasInfinity,
R: Rng,
Streams a segment tree to check if the boxes in intervals
intersect those in points
,
treating the latter as points in dimension dim
: intersections are only reported when the low
endpoint in dimension dim
of a box in points
is inside the projection of a box in intervals
.
If dim > 0
, will recursively stream two segment trees in dimension dim - 1
, so that
each box will be treated both as an interval
and as a point
.
- [
lo
,hi
) is the segment belonging to this node of the streamed segment tree out
will contain pairs ofID
s of intersecting boxes.