全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 k-d tree?

Definition 29.6 University Computer Science — Year 2 · 第 29 章 — Learning from Examples: Decision Trees and Clustering

A kk-d tree of a set of points in Rk\mathbb{R}^k is a binary tree with one point per node. A node at depth ii splits on coordinate i mod ki \bmod k: the points of its left subtree have that coordinate at most the node’s, those of its right subtree at least the node’s. Built by medians, it takes the point of median coordinate as the node, and so has depth ⌊log⁡2n⌋\lfloor \log_2 n \rfloor.

A k-d tree of 15 points built by medians. The circled point is the root: its vertical line splits the square in two. Each half is split by a horizontal line through its median point, and so on, alternating. Blue: splits on x; red: splits on y. Drawn by figs.py from kdtree.py.
A kk-d tree of 15 points built by medians. The circled point is the root: its vertical line splits the square in two. Each half is split by a horizontal line through its median point, and so on, alternating. Blue: splits on xx; red: splits on yy. Drawn by figs.py from kdtree.py.
在原文中阅读 →