Skip to content

volkerp/goquadtree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

About

A quad-tree is a geometrical data structure which offers fast axis aligned range queries (i.e. bounding-box queries) on sets of rectangles and points.

goquadtree is a simple 2D implementation in golang to be used as a golang package.

Depending on size and distribution of data a query may be in orders of magnitudes faster than a linear search.

From the included benchmarks:

BenchmarkRectsQuadtree               100          11309510 ns/op
BenchmarkRectsLinear                   5         407917200 ns/op
BenchmarkPointsQuadtree            50000             51042 ns/op
BenchmarkPointsLinear                  5         407603000 ns/op

Usage

The included tests and benchmarks give an example on how to use the package.

About

A simple quad-tree implementation in golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages