Definition of a range along one dimension. More...
#include <SimpleGeo.h>
Public Types | |
using | Data_t = Data |
Numeric type for boundaries. More... | |
using | Range_t = Range< Data > |
This range type. More... | |
Public Member Functions | |
Range ()=default | |
Default constructor: empty range. More... | |
Range (Data_t lower, Data_t upper, bool doSort=false) | |
Constructor from lower and upper bounds. More... | |
bool | isNull () const |
Returns whether the range is empty. More... | |
Data_t | length () const |
Returns the distance between upper and lower bounds. More... | |
bool | contains (Data_t v) const |
Returns whether the specified value is within the range. More... | |
bool | overlaps (Range_t const &r) const |
Returns whether the specified range overlaps this range. More... | |
Data_t | delta (Data_t v, Data_t margin=0.0) const |
void | extendToInclude (Data_t) |
Extends the range to include the specified point. More... | |
void | extendToInclude (Range_t const &r) |
Extends the range to include the specified point. More... | |
void | intersect (Range_t const &r) |
Shortens this range to include only points also in r . More... | |
Public Attributes | |
Data_t | lower = 1.0 |
Starting coordinate. More... | |
Data_t | upper = 0.0 |
Ending coordinate. More... | |
Private Member Functions | |
void | sort () |
Ensures order of boundaries. Corrupts invalid ranges. More... | |
void | makeNull () |
Resets this range to be empty (that is, like default-constructed). More... | |
Definition of a range along one dimension.
Definition at line 322 of file SimpleGeo.h.
using lar::util::simple_geo::Range< Data >::Data_t = Data |
Numeric type for boundaries.
Definition at line 323 of file SimpleGeo.h.
using lar::util::simple_geo::Range< Data >::Range_t = Range<Data> |
This range type.
Definition at line 324 of file SimpleGeo.h.
|
default |
Default constructor: empty range.
|
inline |
Constructor from lower and upper bounds.
Definition at line 333 of file SimpleGeo.h.
|
inline |
Returns whether the specified value is within the range.
Definition at line 344 of file SimpleGeo.h.
auto lar::util::simple_geo::Range< Data >::delta | ( | Data_t | v, |
Data_t | margin = 0.0 |
||
) | const |
Returns a value that, added to v, makes it fall within a margin in the range.
Definition at line 443 of file SimpleGeo.h.
void lar::util::simple_geo::Range< Data >::extendToInclude | ( | Data_t | v | ) |
void lar::util::simple_geo::Range< Data >::extendToInclude | ( | Range_t const & | r | ) |
Extends the range to include the specified point.
Definition at line 467 of file SimpleGeo.h.
void lar::util::simple_geo::Range< Data >::intersect | ( | Range_t const & | r | ) |
Shortens this range to include only points also in r
.
Definition at line 482 of file SimpleGeo.h.
|
inline |
|
inline |
Returns the distance between upper and lower bounds.
Definition at line 341 of file SimpleGeo.h.
|
inlineprivate |
Resets this range to be empty (that is, like default-constructed).
Definition at line 367 of file SimpleGeo.h.
bool lar::util::simple_geo::Range< Data >::overlaps | ( | Range_t const & | r | ) | const |
Returns whether the specified range overlaps this range.
Definition at line 498 of file SimpleGeo.h.
|
inlineprivate |
Data_t lar::util::simple_geo::Range< Data >::lower = 1.0 |
Starting coordinate.
Definition at line 326 of file SimpleGeo.h.
Data_t lar::util::simple_geo::Range< Data >::upper = 0.0 |
Ending coordinate.
Definition at line 327 of file SimpleGeo.h.