Skip to content

nogilnick/RangeMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RangeMap

A C++ class for efficiently solving the interval query problem.

Interval Query

Given a list L of intervals of the form [a, b) and a point p, determine the set of all intervals in L that contain p.

Usage

// ...
#include "RangeMap.h"

int main() {
  // Interval arrays of start (S) and end (E) points
  int S[] = {0, 5, 10, 15};
  int E[] = {8, 7, 13, 25};
  
  RangeMap<int> rm;
  rm.Build(S, E, 4);
  
  auto qr = rm.Query(20);
  
  return 0;
}

About

C++ Class for Efficiently Performing Interval Queries

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages