📖
Wiki
Back to my personal website
  • Home
  • Equipment and Devices
    • 3D Printer
    • Laser Cutter
    • Motion Capture System
    • Sensors
      • RGB-D Cameras
      • Velodyne LiDAR
      • Zed Camera
      • RealSense D435i
      • IMU
    • eGPU
    • Nvidia AGX Xavier
    • CPU Benchmark
    • Installation Checklist
  • Development
    • Linux
      • Shell
      • GDB
      • Git
      • Tmux
      • Network
      • Tricks
      • Debug FAQ
    • CMake
      • Catkin Tools
      • CMakeLists
      • CMake Variables
      • CMake Commands
      • CMake: find_package()
    • ROS
      • Gazebo
      • wstool
      • roslaunch
      • rosbag
      • multi-threaded spinner
    • ROS2
      • Convert ROS1 bag to ROS2 bag
    • C++
      • C++ 11
      • C++ Examples
      • C++ Debug
      • Factory Method
      • Timing
    • Google Tools
      • GLog
      • GFlags
      • GTest
      • Style Guide
      • Clang Format
    • PCL
      • Point Type
      • Methods
      • Architecture
      • Code Explained
    • Open3D
      • Python API
      • Registration
      • Visualization
      • Tools
    • OpenCV
      • Documentation
      • Modules
    • Other Libraries
      • Eigen
      • Ceres
      • g2o
      • GTSAM
    • Website
  • Algorithm
    • SLAM
      • K-D Tree
      • Octree
      • Bag of Words
      • Distance Measures
      • Coordinate Systems
      • LOAM
      • Iterative Closest Point
      • Generalized ICP
      • Mahalanobis Distance
    • Computer Science
      • Computational Model
      • Sorting
      • Analysis
      • Complexity Classes (P, NP)
      • Divide and Conquer
      • Greedy Algorithm
      • Dynamic Programming
      • Tree
      • Graph
    • Computer Vision
      • Camera Models
      • Distortion
      • Motion Models
      • Shutter
      • Image Sensors
      • Epipolar Geometry
      • Multiple-View Geometry
    • Datasets
      • RGB-D Datasets
      • Point Cloud Datasets
      • LiDAR SLAM Datasets
  • Math
    • Optimization
      • Convex Optimization
      • Descent Methods
    • Probability
      • Moment
      • Covariance Matrix
      • Stochastic Process
    • Topology
      • References
      • Concepts
      • Topological Spaces
      • Representation of Rotations
      • Representation of 3-sphere
    • Algebra
      • Linear Algebra
      • Matrix Factorization
      • Condition Number
      • Matrix Lie Group
    • Differential Geometry
      • Manifold
      • Submanifold
      • Quotient Manifolds
      • Tangent Space
  • Quadrotor
    • PX4 Development
    • Companion Computer
    • Drone Hardware
    • Propeller Lock
    • Debug
  • Favorites
    • Bookmarks
Powered by GitBook
On this page
  • Binary Search Tree (BST)
  • K-D Tree
  • Comparison of various data structures
  • Discussions on K-D Tree

Was this helpful?

  1. Algorithm
  2. SLAM

K-D Tree

Binary Search Tree (BST)

Tree

  • In graph theory, a tree is a connected acyclic undirected graph, and a forest is a disjoint union of trees.

  • In computer science, a tree is a widely used abstract data type (ADT) that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node, represented as a set of linked nodes. (This "linked" relation can be implemented by a linked list or an array with certain indexing rules.)

Binary Tree

  • A binary tree is a tree data structure in which each node has at most two children. (This is the only constraint.)

Binary Search Tree (BST)

  • In computer science, a binary search tree (BST), also called an ordered or sorted binary tree, is a rooted binary tree data structure whose internal nodes each store a key greater than all the keys in the node's left subtree and less than those in its right subtree.

  • Used for sorting: the construction step takes O(n log n) time, then the sorted list can be obtained by traversing all nodes in O(log n) time.

  • Algorithm

    Average

    Worst case

    Space

    O(n)

    O(n)

    Search

    O(log n)

    O(n)

    Insert

    O(log n)

    O(n)

    Delete

    O(log n)

    O(n)

K-D Tree

  • In computer science, a k-d tree (short for k-dimensional tree) is a space-partitioning data structure for organizing points in a k-dimensional space

  • k-d trees are a special case of binary space partitioning trees.

  • Algorithm

    Average

    Worst case

    Space

    O(n)

    O(n)

    Search

    O(log n)

    O(n)

    Insert

    O(log n)

    O(n)

    Delete

    O(log n)

    O(n)

Comparison of various data structures

Discussions on K-D Tree

  • It is said that Euclidean distance is a bad metric in high dimensional space.

  • There are debates on using K-D Tree for high dimensional data.

PreviousSLAMNextOctree

Last updated 1 year ago

Was this helpful?

Against: by Kevin Beyer et al.

For: by Robert Durrant et al. ()

More discussions on

When Is "Nearest Neighbor" Meaningful?
When is ‘nearest neighbour’ meaningful: A converse theorem and implications
Bob's answer on Stack Exchange
Stackoverflow: Nearest neighbors in high-dimensional data?