Code Monkey home page Code Monkey logo

interval-tree's People

Contributors

kwong-yw avatar maddymarkovitz avatar misshie avatar ssimeonov avatar tvanderpol avatar zimbix 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

interval-tree's Issues

Misleading description

The project description states that this is an augmented tree implementation when in fact it's very much a centered interval tree. Please fix.

Insert and delete? And some other questions

Hello, I think am in need of an interval tree. I saw yours but it looks like it only handles a fixed set of ranges rather than allowing for inserts and deletes. Is that correct?

Context

Ultimately I am working on this https://twitter.com/schneems/status/1479554521307176960 where I want to speed up this code: https://github.com/zombocom/dead_end/blob/0170bf3df9c045e4d5f042c6b161ff0c30f2efda/lib/dead_end/code_frontier.rb#L152-L154. I need to find all elements in a collection that are between two values.

I've begun attempting to write an augmented interval tree based on a red-black tree and then specializing it to optimize for querying elements that are completely within a given range. I'm doing one insert and one search for every operation so both need to be equally fast. Right now with a plain binary tree my insert is fast, but searching for contained entries is slower than a naive array iteration of N elements.

It's my belief that adding annotations to the red-black tree, (and possibly reversing the sort interval, so it's sorted on end key first and start key last) will allow me to eliminate more nodes from my search and hopefully give me better than naive time.

Questions

  • Can you verify that insert/delete are not implemented on this?
  • Assuming it could insert/delete would this centered interval tree be a good structure for querying elements contained by a range?
  • Any general advice, hints, or tips? Sorry for the random extra questions, I appreciate that this isn't stack overflow but wanted to see if you had any thoughts

BTW thanks for open-sourcing this.

Switch from Travis to GitHub Actions

Travis builds have been inexplicably failing recently, and it's kinda slow to pick up the jobs.

We use Buildkite for our private repos, but for security reasons, we shouldn't use it for public repos, where PR branches build automatically.

Elsewhere, I've seen we've had luck with GitHub Actions, so let's go with that.

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.