Git Product home page Git Product logo

quadtree's Introduction

Quadtree

Build Status codecov

Quadtree is a C++ implementation of a quadtree.

Quadtree aims to be:

  • versatile (can be used in dynamic and static contexts)
  • simple
  • lightweight
  • easy to use
  • fast
  • header only
  • implemented with modern C++ features (C++17)

Google Benchmark is required to build the benchmarks and GoogleTest is required for the tests.

Documentation

I have written an article on my blog describing the design and the code of the library. It is available here.

Otherwise, just look at the Quadtree.h file, the interface is easy to understand.

License

Distributed under the MIT License.

quadtree's People

Contributors

piotrklos-tcl avatar pvigier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

quadtree's Issues

Documentation lacks dependencies

Hi Pierre,

Thank you for providing such a well packaged implementation of quadtrees. However, I would like to kindly ask you to include dependencies of the project in the readme file, in order to get it running quickly in a linux machine. I personally had to spend a few hours figuring out how to build your project using cmake, because of some dependencies which I was not aware of and then didn't know how to easily install them. To be specific, I'm working on an Ubuntu 20 machine with x64 CPU and the dependencies I had to install were Google Benchmark and Google Test C++ libraries using apt package manager:

sudo apt install libbenchmark-dev libgtest-dev

So far these are the dependencies I discovered and should there be more, please let us know :)

Find 2D point in quadrilateral collection ?

I have a collection (10,000s) of 2d quadrilateral shapes/polygon

I have a collection (millions) of 2d points

I would like to know if this library is suitable for me quickly find (for each 2d point) which quadrilateral it intersects/bounds with or possibly no intersection at all.

If it is possible, which example or function call would you recommend I focus on to study deeper ?

can't tryMerge grandparent

when remove a value, the code tryMerge parent. However, grandparent may need to merge too and there is no code for tryMerge grandparent.

Wrong float in quadtree constructor?

Hi,

I am trying to make a unsigned int quadtree. In the template, I put unsigned in the last parameter. Everywhere is the code it uses the "Float" type except a single place in the constructor (Quadtree.h Line:24)

Was that intended? Is it even possible to do a unsigned quadtree?

Thanks!
Beurnii

box contains funtion

constexpr bool contains(const Box<T>& box) const noexcept
{
    return left <= box.left && box.getRight() <= getRight() &&
        **top <= box.top** && box.getBottom() <= getBottom();
}

I think it should be

constexpr bool contains(const Box<T>& box) const noexcept
{
    return left <= box.left && box.getRight() <= getRight() &&
        **top >= box.top** && box.getBottom() <= getBottom();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.