libStatGen Software
1
|
This class contains a list of non-overlapping regions, just positions, not including chromosomes (see NonOverlapRegions for chromosomes and positions). More...
#include <NonOverlapRegions.h>
Public Member Functions | |
NonOverlapRegionPos (const NonOverlapRegionPos ®) | |
Copy constructor, does not copy, but initializes with an empty region list. More... | |
void | add (int32_t start, int32_t end) |
End position is not included in the region. More... | |
bool | inRegion (int32_t pos) |
Return whether or not the position was found within a region. More... | |
Friends | |
class | NonOverlapRegionsTest |
This class contains a list of non-overlapping regions, just positions, not including chromosomes (see NonOverlapRegions for chromosomes and positions).
When regions are added that overlap, it merges them. After adding regions, you can check to see if a position is found in one of the regions. It is designed to work fastest if you make calls in sequential order.
Definition at line 33 of file NonOverlapRegions.h.
NonOverlapRegionPos::NonOverlapRegionPos | ( | const NonOverlapRegionPos & | reg | ) |
Copy constructor, does not copy, but initializes with an empty region list.
Definition at line 59 of file NonOverlapRegions.cpp.
void NonOverlapRegionPos::add | ( | int32_t | start, |
int32_t | end | ||
) |
End position is not included in the region.
If this region overlaps another region(s), they will be merged into one region.
Definition at line 75 of file NonOverlapRegions.cpp.
References inRegion().
bool NonOverlapRegionPos::inRegion | ( | int32_t | pos | ) |
Return whether or not the position was found within a region.
If it is found within the region, myRegionIter will point to the region otherwise myRegionIter will point to the region after the position or to the end if the position is after the last region.
Definition at line 155 of file NonOverlapRegions.cpp.
Referenced by add().