LArSoft
v07_13_02
Liquid Argon Software toolkit - http://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 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.
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 443 of file SimpleGeo.h.
Referenced by lar::util::simple_geo::Rectangle< double >::contains(), and 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 456 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 467 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.
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.
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 338 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 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.
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 364 of file SimpleGeo.h.
Data_t lar::util::simple_geo::Range< Data >::lower = 1.0 |
Starting coordinate.
Definition at line 326 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 327 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().