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
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.
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.
Modern Information Retrieval
Lec 15 April 9 Topics: l binary Trees l expression trees Binary Search Trees (Chapter 5 of text)
Chapter 12 C Data Structures Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education Inc.
Binary Trees. Linear data structures Here are some of the data structures we have studied so far: –Arrays –Singly-linked lists and doubly-linked lists.
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.
CHAPTER 71 TREE. Binary Tree A binary tree T is a finite set of one or more nodes such that: (a) T is empty or (b) There is a specially designated node.
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.
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.
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
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.
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: A Pseudocode Approach with C, Second Edition 1 Chapter 7 Objectives Create and implement binary search trees Understand the operation.
Binary Trees. 2 Parts of a binary tree A binary tree is composed of zero or more nodes In Java, a reference to a binary tree may be null Each node contains:
Linear Octree Ref: Tu and O’Hallaron 2004
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.
Binary Tree.
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 : Part 1 Reading: Section 4.1 Theory and Terminology Preorder, Postorder and Levelorder Traversals.
Fundamentals of Algorithms MCS - 2 Lecture # 17. Binary Search Trees.
May 2012Range Search Algorithms1 Shmuel Wimer Bar Ilan Univ. Eng. Faculty Technion, EE Faculty.
Binary Trees.
Balanced Search Trees 2-3 Trees AVL Trees Red-Black Trees
Chapter 12 – Data Structures
Binary Trees.
CPS216: Data-intensive Computing Systems
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
Trees.
Tree.
Section 8.1 Trees.
Binary Trees, Binary Search Trees
Chapter 10: Non-linear Data Structures
CS223 Advanced Data Structures and Algorithms
Binary Trees.
Binary Trees.
Binary Trees.
Shmuel Wimer Bar Ilan Univ., School of Engineering
Advanced Implementation of Tables
Binary Trees, Binary Search Trees
Advanced Implementation of Tables
Trees.
Binary Trees.
Chapter 20: Binary Trees.
AVL Tree Chapter 6 (cont’).
CMSC 341 K-D Trees.
Lecture 20: Indexes Monday, February 27, 2006.
Binary Trees.
Binary Trees, Binary Search Trees
B+-trees In practice, B-trees are not used much as defined earlier.
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