the class is designed to support a relatively small set of ranges and answer the questions:
#include <RangeSet.hpp>
| Classes | |
| class | RangeSet | 
| Public Types | |
| typedef std::pair< uint32_t, uint32_t > | Range | 
| typedef std::vector< RangeSet > | ChromosomeRanges | 
| Public Member Functions | |
| FastRangeSet (const reference::CrrFile &ref) | |
| bool | intersects (const reference::Range &inRange) const | 
| Returns true if there is a range in this set that overlaps the specified range. | |
| bool | contains (const reference::Location &loc) const | 
| Returns true if any range of this set contains the given location. | |
| void | add (const reference::Range &r) | 
| void | add (const std::string &rangeStr) | 
| add a string range into the set | |
| void | add (const StringVector &rangeStrSet) | 
| void | addWholeReference (size_t extendRangeLength=0) | 
| Fills the range set to cover the whole reference. | |
| const ChromosomeRanges & | getRanges () const | 
| void | clear () | 
| bool | empty () const | 
| void | regressionTest () | 
| Protected Attributes | |
| const reference::CrrFile & | reference_ | 
| ChromosomeRanges | ranges_ | 
the class is designed to support a relatively small set of ranges and answer the questions:
| bool cgatools::util::FastRangeSet::intersects | ( | const reference::Range & | inRange | ) | const | 
Returns true if there is a range in this set that overlaps the specified range.
Zero-length overlap is allowed for empty ranges, therefore an empty range overlaps with itself. An empty range overlap includes begin of other range: [b,b) overlaps [a,b) and [b,c) and vise versa.
 1.6.2
 1.6.2