Skip to content
 
 

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An implementation of the agumented interval tree algorithm in Ruby

require "interval_tree"

itv = [(0...3), (1...4), (3...5),]
t = IntervalTree::Tree.new(itv)
p t.search(2) => [0...3, 1...4]
p t.search(1...3) => [0...3, 1...4, 3...5]

Result intervals are always returned in the “left-closed and right-open” style that can be expressed by three-dotted Range object literals (first…last)

Full-closed intervals “(first..last)” for tree are internally converted to half-closed intervals.

Author

MISHIMA, Hiroyuki ( github.com/misshie )

Copyright

© 2011, MISHIMA, Hiroyuki

License

The MIT/X11 license

About

A Ruby implementation of augmented interval tree

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages