geosearch.ppt - Computer Science Department at Princeton University.ppt.ppt

geosearch.ppt - Computer Science Department at Princeton University.ppt.ppt

  1. 1、本文档共40页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
geosearch.ppt - Computer Science Department at Princeton University.ppt

Geometric Algorithms Geometric search: Overview Types of data. Points, lines, planes, polygons, circles, ... This lecture. Sets of N objects. Geometric problems extend to higher dimensions. Good algorithms also extend to higher dimensions. Curse of dimensionality. Basic problems. Range searching. Nearest neighbor. Finding intersections of geometric objects. 1D Range Search Extension to symbol-table ADT with comparable keys. Insert key-value pair. Search for key k. How many records have keys between k1 and k2? Iterate over all records with keys between k1 and k2. Application: database queries. Geometric intuition. Keys are point on a line. How many points in a given interval? 1D Range Search Implementations Range search. How many records have keys between k1 and k2? Ordered array. Slow insert, binary search for k1 and k2 to find range. Hash table. No reasonable algorithm (key order lost in hash). BST. In each node x, maintain number of nodes in tree rooted at x. Search for smallest element ? k1 and largest element ? k2. 2D Orthogonal Range Search Extension to symbol-table ADT with 2D keys. Insert a 2D key. Search for a 2D key. Range search: find all keys that lie in a 2D range? Range count: how many keys lie in a 2D range? Applications: networking, circuit design, databases. Geometric interpretation. Keys are point in the plane. Find all points in a given h-v rectangle? 2D Orhtogonal Range Search: Grid Implementation Grid implementation. [Sedgewick 3.18] Divide space into M-by-M grid of squares. Create linked list for each square. Use 2D array to directly access relevant square. Insert: insert (x, y) into corresponding grid square. Range search: examine only those grid squares that could have points in the rectangle. 2D Orthogonal Range Search: Grid Implementation Costs Space-time tradeoff. Space: M2 + N. Time: 1 + N / M2 per grid cell examined on average. Choose grid square size to tune performance. Too small: wastes space. T

文档评论(0)

80019pp + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档