LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
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 354 of file SimpleGeo.h.
using lar::util::simple_geo::Range< Data >::Data_t = Data |
Numeric type for boundaries.
Definition at line 355 of file SimpleGeo.h.
using lar::util::simple_geo::Range< Data >::Range_t = Range<Data> |
This range type.
Definition at line 356 of file SimpleGeo.h.
|
default |
Default constructor: empty range.
|
inline |
Constructor from lower and upper bounds.
Definition at line 365 of file SimpleGeo.h.
|
inline |
Returns whether the specified value is within the range.
Definition at line 377 of file SimpleGeo.h.
Referenced by lar::util::simple_geo::Rectangle< double >::contains(), and geo::DriftPartitions::DriftVolume_t::coversDrift().
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 473 of file SimpleGeo.h.
Referenced by geo::PlaneGeo::DeltaFromActivePlane().
void lar::util::simple_geo::Range< Data >::extendToInclude | ( | Data_t | v | ) |
Extends the range to include the specified point.
Definition at line 484 of file SimpleGeo.h.
Referenced by geo::DriftPartitions::computeCoverage(), and geo::details::ActiveAreaCalculator::includeAllWireEnds().
void lar::util::simple_geo::Range< Data >::extendToInclude | ( | Range_t const & | r | ) |
Extends the range to include the specified point.
Definition at line 498 of file SimpleGeo.h.
References lar::util::simple_geo::Range< Data >::isNull(), lar::util::simple_geo::Range< Data >::lower, r, and lar::util::simple_geo::Range< Data >::upper.
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 513 of file SimpleGeo.h.
References lar::util::simple_geo::Range< Data >::isNull(), lar::util::simple_geo::Range< Data >::lower, and lar::util::simple_geo::Range< Data >::upper.
|
inline |
Returns whether the range is empty.
Definition at line 371 of file SimpleGeo.h.
Referenced by lar::util::simple_geo::Range< Data >::extendToInclude(), lar::util::simple_geo::Range< Data >::intersect(), lar::util::simple_geo::Rectangle< double >::isNull(), and lar::util::simple_geo::Range< Data >::overlaps().
|
inline |
Returns the distance between upper and lower bounds.
Definition at line 374 of file SimpleGeo.h.
|
inlineprivate |
Resets this range to be empty (that is, like default-constructed).
Definition at line 403 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 529 of file SimpleGeo.h.
References lar::util::simple_geo::Range< Data >::isNull(), lar::util::simple_geo::Range< Data >::lower, and lar::util::simple_geo::Range< Data >::upper.
|
inlineprivate |
Ensures order of boundaries. Corrupts invalid ranges.
Definition at line 397 of file SimpleGeo.h.
Data_t lar::util::simple_geo::Range< Data >::lower = 1.0 |
Starting coordinate.
Definition at line 358 of file SimpleGeo.h.
Referenced by geo::details::ActiveAreaCalculator::adjustCorners(), geo::details::ActiveAreaCalculator::applyMargin(), lar::util::simple_geo::Range< Data >::extendToInclude(), lar::util::simple_geo::Range< Data >::intersect(), geo::part::details::RangeLowerBoundExtractor< Range >::operator()(), lar::util::simple_geo::Range< Data >::overlaps(), and geo::DriftPartitions::DriftVolume_t::Position().
Data_t lar::util::simple_geo::Range< Data >::upper = 0.0 |
Ending coordinate.
Definition at line 359 of file SimpleGeo.h.
Referenced by geo::details::ActiveAreaCalculator::adjustCorners(), geo::details::ActiveAreaCalculator::applyMargin(), lar::util::simple_geo::Range< Data >::extendToInclude(), lar::util::simple_geo::Range< Data >::intersect(), and lar::util::simple_geo::Range< Data >::overlaps().