LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
std::set of util::Range, which does not allow any overlap in contained element. std::set<Range> w/ modified insert/emplace function. Original std::set does not allow
modification of element. I assume what we're interested in is "find if the range already \n
exists, and merge if it exists". The insert function does that by recursively looking up
overlapping elements w.r.t. input argument of insert function.
More...
#include "Range.h"
Public Member Functions | |
UniqueRangeSet () | |
default ctor More... | |
~UniqueRangeSet () | |
default dtor More... | |
void | Merge (const UniqueRangeSet< T > &in) |
Merge two UniqueRangeSet<T> More... | |
const T & | Start () const |
Very first "start" of all contained range. More... | |
const T & | End () const |
Very last "end" of all contained range. More... | |
UniqueRangeSet< T > | Exclusive (const T start, const T end) const |
size_t | emplace (const T &start, const T &end) |
Modified emplace that merges overlapping range. Return = # merged range. More... | |
size_t | insert (const Range< T > &a) |
Modified insert that merges overlapping range. Return = # merged range. More... | |
Public Attributes | |
K | keys |
STL member. More... | |
std::set of util::Range, which does not allow any overlap in contained element. std::set<Range> w/ modified insert/emplace function. Original std::set does not allow
modification of element. I assume what we're interested in is "find if the range already \n
exists, and merge if it exists". The insert function does that by recursively looking up
overlapping elements w.r.t. input argument of insert function.
One important function worth noting is util::UniqueRangeSet::Exclusive which takes two
input arguments, "start" and "end", and returns util::UniqueRangeSet of all exclusive
regions between "start" and "end". By definition, merging this return with the original
instance will result in 1 huge util::Range.
|
inline |
|
inline |
|
inline |
Modified emplace that merges overlapping range. Return = # merged range.
Definition at line 95 of file UniqueRangeSet.h.
References util::end(), util::UniqueRangeSet< T >::insert(), and util::Range< T >::Merge().
Referenced by util::UniqueRangeSet< T >::insert(), and util::UniqueRangeSet< T >::Merge().
|
inline |
Very last "end" of all contained range.
Definition at line 58 of file UniqueRangeSet.h.
References util::size().
|
inline |
It takes two input arguments, "start" and "end", and returns util::UniqueRangeSet
of all exclusive regions between "start" and "end". By definition, merging this
return with the original instance will result in 1 huge util::Range.
Definition at line 69 of file UniqueRangeSet.h.
References util::begin(), and util::end().
|
inline |
Modified insert that merges overlapping range. Return = # merged range.
Definition at line 115 of file UniqueRangeSet.h.
References util::Range< T >::_window, and util::UniqueRangeSet< T >::emplace().
Referenced by util::UniqueRangeSet< T >::emplace().
|
inline |
Merge two UniqueRangeSet<T>
Definition at line 44 of file UniqueRangeSet.h.
References util::UniqueRangeSet< T >::emplace(), and r.
|
inline |
Very first "start" of all contained range.
Definition at line 51 of file UniqueRangeSet.h.
References util::begin(), and util::size().
|
inherited |
STL member.