Linear Octree Ref: Tu and O’Hallaron 2004

Slides:



Advertisements
Similar presentations
Chapter 12 Binary Search Trees
Advertisements

Nearest Neighbor Search
Introduction to Computer Science 2 Lecture 7: Extended binary trees
Spatial Data Structures Hanan Samet Computer Science Department
CS Fall 2012, Lab 08 Haohan Zhu. Boston University Slideshow Title Goes Here CS Fall 2012, Lab /17/2015 Tree - Data Structure  Basic.
Binary Trees Chapter 6. Linked Lists Suck By now you realize that the title to this slide is true… By now you realize that the title to this slide is.
Lecture 16: Tree Traversal.
Advanced Data Structures
Binary Trees, Binary Search Trees CMPS 2133 Spring 2008.
Binary Trees, Binary Search Trees COMP171 Fall 2006.
Computer Graphics1 Quadtrees & Octrees. Computer Graphics2 Quadtrees n A hierarchical data structure often used for image representation. n Quadtrees.
CS 171: Introduction to Computer Science II
Modern Information Retrieval
Lec 15 April 9 Topics: l binary Trees l expression trees Binary Search Trees (Chapter 5 of text)
CS 261 – Winter 2010 Trees. Ubiquitous – they are everywhere in CS Probably ranks third among the most used data structure: 1.Vectors and Arrays 2.Lists.
© 2006 Pearson Addison-Wesley. All rights reserved13 B-1 Chapter 13 (excerpts) Advanced Implementation of Tables CS102 Sections 51 and 52 Marc Smith and.
The Etree Library: A System for Manipulating Large Octrees on Disk David R. O’Hallaron Associate Professor of CS and ECE Carnegie Mellon University (joint.
Binary Trees. 2 Linear data structures Here are some of the data structures we have studied so far: –Arrays –Singly-linked lists and doubly-linked lists.
Indexing. Goals: Store large files Support multiple search keys Support efficient insert, delete, and range queries.
Types of Binary Trees Introduction. Types of Binary Trees There are several types of binary trees possible each with its own properties. Few important.
 B+ Tree Definition  B+ Tree Properties  B+ Tree Searching  B+ Tree Insertion  B+ Tree Deletion.
Lecture 10 Trees –Definiton of trees –Uses of trees –Operations on a tree.
Binary Trees 2 Overview Trees. Terminology. Traversal of Binary Trees. Expression Trees. Binary Search Trees.
Binary Trees, Binary Search Trees RIZWAN REHMAN CENTRE FOR COMPUTER STUDIES DIBRUGARH UNIVERSITY.
© 2006 Pearson Addison-Wesley. All rights reserved13 B-1 Chapter 13 (continued) Advanced Implementation of Tables.
Tree Data Structures.
Computer Science: A Structured Programming Approach Using C Trees Trees are used extensively in computer science to represent algebraic formulas;
Lecture – Searching a Tree Neil Ghani University of Strathclyde.
CSE221/ICT221 Analysis and Design of Algorithms CSE221/ICT221 Analysis and Design of Algorithms Analysis of Algorithm using Tree Data Structure Asst.Prof.
© 2006 Pearson Education Chapter 10: Non-linear Data Structures Presentation slides for Java Software Solutions for AP* Computer Science A 2nd Edition.
Trees : Part 1 Section 4.1 (1) Theory and Terminology (2) Preorder, Postorder and Levelorder Traversals.
Chapter 4: Trees Part I: General Tree Concepts Mark Allen Weiss: Data Structures and Algorithm Analysis in Java.
Discrete Mathematics Chapter 5 Trees.
Foundation of Computing Systems
1 Chapter 7 Objectives Upon completion you will be able to: Create and implement binary search trees Understand the operation of the binary search tree.
Graphs A graphs is an abstract representation of a set of objects, called vertices or nodes, where some pairs of the objects are connected by links, called.
Binary Tree. Some Terminologies Short review on binary tree Tree traversals Binary Search Tree (BST)‏ Questions.
Rooted Tree a b d ef i j g h c k root parent node (self) child descendent leaf (no children) e, i, k, g, h are leaves internal node (not a leaf) sibling.
DATA STRUCTURE BS(IT)3rd. Tree An Introduction By Yasir Mustafa Roll No. BS(IT) Bahauddin Zakariya University, Multan.
Data Structures Lakshmish Ramaswamy. Tree Hierarchical data structure Several real-world systems have hierarchical concepts –Physical and biological systems.
Data Structures: A Pseudocode Approach with C, Second Edition 1 Chapter 7 Objectives Create and implement binary search trees Understand the operation.
1 Trees General Trees  Nonrecursive definition: a tree consists of a set of nodes and a set of directed edges that connect pairs of nodes.
Lecture 7: Searching a Tree Neil Ghani University of Strathclyde.
Graphs and Trees Mathematical Structures for Computer Science Chapter 5 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesGraphs and Trees.
1 Trees General Trees  Nonrecursive definition: a tree consists of a set of nodes and a set of directed edges that connect pairs of nodes.
1 Trees : Part 1 Reading: Section 4.1 Theory and Terminology Preorder, Postorder and Levelorder Traversals.
Trees By JJ Shepherd. Introduction Last time we discussed searching and sorting in a more efficient way Divide and Conquer – Binary Search – Merge Sort.
Fundamentals of Algorithms MCS - 2 Lecture # 17. Binary Search Trees.
Balanced Search Trees 2-3 Trees AVL Trees Red-Black Trees
Fundamentals of Programming II Introduction to Trees
Indexing Goals: Store large files Support multiple search keys
Binary Search Tree (BST)
Source Code for Data Structures and Algorithm Analysis in C (Second Edition) – by Weiss
Tree.
Section 8.1 Trees.
Binary Trees, Binary Search Trees
CS223 Advanced Data Structures and Algorithms
Binary Trees.
Binary Trees.
Binary Trees.
Binary Search Trees.
Linear Octree Ref: Tu and O’Hallaron 2004
Binary Trees: Motivation
Advanced Implementation of Tables
Binary Trees, Binary Search Trees
Advanced Implementation of Tables
Binary Search Trees Chapter 7 Objectives
Chapter 20: Binary Trees.
การวิเคราะห์และออกแบบขั้นตอนวิธี
Binary Trees, Binary Search Trees
Presentation transcript:

Linear Octree Ref: Tu and O’Hallaron 2004 Simple and Efficient Traversal Methods for Quadtrees and Octrees, Frisken and Perry 2002

Pointer-based Representation 00 01 10 11

Linear Octree Assign a unique key (locational code) to each node Represent an octree as a collection of lear nodes comprising it Extremely useful in practice when main memory cannot accommodate a pointer-based octree

Locational code The code for each node is of the same length (zero-padded) Level of the node is also attached

Octree and Linear Octree b c d e f g h i j a b c d e f g h i j a 0xx b 000 c 001 d 002 e 003 f 01x g 02x h 03x i 2xx j 3xx a 000000_01 f 010100_10 b 000000_11 g 011000_10 c 000001_11 h 011100_10 d 000010_11 i 100000_01 e 000011_11 j 110000_01 Base-4 codes

Observation When we sort the leaf nodes according to their locational codes (as binary scalars), the order is the same as the preorder traversal of the octree In octree, we may use octal number for coding

Simple and Efficient Traversal Methods for Quadtrees and Octrees Frisken and Perry 2002 (MERL) Usually locational code is for linear octrees (for more compact representation); here it is used in tree-based representations to facilitate a simpler and more efficient query for point location, region location and neighbor finding

Representation Locational code = pos2root_level Depth of tree: N_LEVELS Level of root: N_LEVELS-1 Level of smallest possible cell: 0 Locational code = pos2root_level [5] [4] [3] [2] [1] [0]

Point Location Binary(trunc(0.55*32)) =binary(17) = 010001 0.55

Region Location (1) [0.31, 0.65) Code(0.31)=001001 Code(0.65)=010101 Xor =011100

Region Location (2) [.31,.36) Code(0.31)=001001 Code(0.36)=001010 Xor =000011

Neighbor Search