Skip to content

A Java implementation of the K-d Tree data structure

License

Notifications You must be signed in to change notification settings

mgruben/Kd-Trees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kd-Trees

A Java implementation of the K-d Tree data structure.

Introduction

Given an arbitrary set of points in k-dimensions, implement a data structure in which the runtime of range search and nearest-neighbor search is, on average, better than linear in the number of points.

In this implementation, k = 2.

Visualizations

Kd-Tree Partitions

Kd-Tree Partitions

Range Search

Range Search

Nearest Neighbor

Nearest Neighbor

More Information

An excellent discussion of the Kd-Tree data structure can be found at Princeton's Algorithms and Data Structures, Part I website.

Motivation

This project was completed for Algorithms, Part I.

If you're in that course or related course right now, obey all honor code requirements before viewing this code.
I recommend that this code should only be viewed after you've completed your own implementation.
If you're super stuck, take a break, take a walk, and it will come to you; good luck.

About

A Java implementation of the K-d Tree data structure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages