We propose a new query application for the well-known Trapezoidal Search DAG (TSD) of a set of $n$~line segments in the plane, where queries are allowed to be {\em vertical line segments}. We show that a simple Depth-First Search reports the $k$ trapezoids that are intersected by the query segment in $O(k+\log n)$ expected time, regardless of the spatial location of the query. This bound is optimal and matches known data structures with $O(n)$ size. In the important case of edges from a connected, planar graph, our simplistic approach yields an expected $O(n \log^*\!n)$ construction time, which improves on the construction time of known structures for vertical segment-queries. Also for connected input, a simple extension allows the TSD approach to directly answer axis-aligned window-queries in $O(k + \log n)$ expected time, where $k$ is the result size.
翻译:针对平面上一组$n$条线段,本文提出了一种利用著名数据结构梯形搜索DAG(TSD)的新查询应用,其中允许查询为{\em垂直线段}。我们证明,无论查询的空间位置如何,简单的深度优先搜索在期望时间$O(k+\log n)$内能返回与查询线段相交的$k$个梯形。该界是最优的,且与已知的$O(n)$空间数据结构相匹配。在连通平面图边的重要情形下,我们的简单方法可实现期望的$O(n \log^*\!n)$构建时间,这改进了已知垂直线段查询数据结构的构建时间。对于连通输入,通过简单扩展,TSD方法可直接以期望时间$O(k + \log n)$回答轴对齐窗口查询,其中$k$为结果大小。