对给定的一个直线段集合S研究求与S中所有直线段都相交的直线的问题.设S中的线段满足一定的不交性假设,算法可回答是否存在与S中所有线段均相交的直线的问题.如果该直线存在,则求出这样的直线的最大存在范围——位于该范围内的每条直线都与S中的所有直线段相交.该算法的时间复杂性为O(n*log n),应用背景是模式匹配等领域.
For a given set S of line segments, finding a straight line intersecting with all the line segments in S is studied in this paper. If an intersection restriction is satisfied by the set, the algorithm presented is to answer whether there is a straight line intersecting with all the line segments in S. If the straight lines exist, the algorithm finds a maximum range, where every straight line located in the range intersects with all the line segments in S. The time complexity of the algorithm is O(n×log n). The algorithm can be used in pattern marching and so on.