This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Motivation Interval trees Priority search trees Windowing queries Computational Geometry Lecture 14: Windowing queries Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Zoom in; recenter and zoom in; select by outlining Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Given a set of n axisparallel line segments, preprocess them into a data structure so that the ones that intersect a query rectangle can be reported efficiently Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing How can a rectangle and an axisparallel line segment intersect? Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Essentially two types: Segments whose endpoint lies in the rectangle (or both endpoints) Segments with both endpoints outside the rectangle Segments of the latter type always intersect the boundary of the rectangle (even the left and/or bottom side) Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Instead of storing axisparallel segments and searching with a rectangle, we will: store the segment endpoints and query with the rectangle store the segments and query with the left side and the bottom side of the rectangle Note that the query problem is at least as hard as rectangular range searching in point sets Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Instead of storing axisparallel segments and searching with a rectangle, we will: store the segment endpoints and query with the rectangle store the segments and query with the left side and the bottom side of the rectangle Question: How often might we report the same segment? Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Avoiding reporting the same segment several times Use one representation of each segment, and store a mark bit with it that is initially false When we think we should report a segment, we first check its mark bit: if false , then report it and set the mark bit to true otherwise, don’t do anything After a query, we need to reset all mark bits to false , for the next query (how?) Computational Geometry Lecture 14: Windowing queries Motivation Interval trees Priority search trees Windowing queries Windowing Instead of storing axisparallel segments and searching with a rectangle, we will: store the segment endpoints and query with the rectangle use range tree (from Chapter 5) store the segments and query with the left side and the...
View
Full Document
 Fall '08
 Staff
 Zürich Hauptbahnhof, Lright, Motivation Interval trees, Interval trees Priority, trees Priority search

Click to edit the document details