We propose new query applications of the well-known Trapezoidal Search DAG (TSD) on a set of $n$ line segments in the plane, where queries are allowed to be {\em vertical line segments}. We show that our algorithm reports the $k$ trapezoids that are intersected by the query segment in ${\cal O}(k+\log n)$ expected time, regardless of the spatial location of the segment set and the query. This improves on the query time and space bound of the well-known Segment Tree based approach, which is to date the theoretical bottleneck for optimal query time. In the case where the set of segments is a connected planar subdivision, this method can easily be extended to report the $k$ segments which intersect an axis aligned query window in ${\cal O}(k + \log n)$ expected time. Our publicly available implementation handles degeneracies exactly, including segments with overlap and multi-intersections. Experiments on real and synthetic data sets show that the method is practical and provides more reliable query times in comparison to R-trees and the segment tree based data structure.
翻译:我们建议对在平面上一组以美元计数的线段应用众所周知的Trapioidal Search DAG(TSD) 。 我们显示,我们的算法报告查询段以$>cal O}(k ⁇ log n) 的预期时间相互交叉的$k$ gabeezoids($k$k$k$), 不论所设定的段的空间位置和查询时间。 这改善了基于众所周知的片段树式方法的查询时间和空间约束, 该方法迄今为止是理论的瓶颈, 用于最佳查询时间。 如果各段是一个连接的平面子子子, 这种方法很容易被扩展, 以报告以$>cal O}(k +\log n) 为单位的轴对齐查询窗口相交叉的$k$k$@cal O} (k +\log n) 预期时间。 我们公开可用的执行程序精确的解算器, 包括有重叠和多截段。 对真实和合成数据集的实验显示, 这种方法是实用的, 并且提供了更可靠的查询时间。