Auxiliary data structure for reading Honda bin ranges.
More...
#include <JHondaFluxInterpolator.hh>
Auxiliary data structure for reading Honda bin ranges.
Definition at line 70 of file JHondaFluxInterpolator.hh.
◆ JRange_t
◆ pair_type
◆ range_type
◆ argument_type
◆ key_type
◆ mapped_type
◆ JHondaBinRange() [1/2]
| JAANET::JHondaBinRange::JHondaBinRange |
( |
| ) |
|
|
inline |
◆ JHondaBinRange() [2/2]
Constructor.
- Parameters
-
| minimum | minimum value |
| maximum | maximum value |
Definition at line 89 of file JHondaFluxInterpolator.hh.
90 :
92 {}
JRange< double > JRange_t
◆ getCentralValue()
| double JAANET::JHondaBinRange::getCentralValue |
( |
| ) |
const |
|
inline |
◆ operator pair_type()
Type conversion operator.
- Returns
- piar
Definition at line 124 of file JRange.hh.
◆ getRange()
Get range.
- Returns
- range
Definition at line 135 of file JRange.hh.
◆ setRange() [1/6]
Set range.
- Parameters
-
Definition at line 146 of file JRange.hh.
◆ setRange() [2/6]
Set lower and upper limit.
- Parameters
-
| x | lower limit |
| y | upper limit |
Definition at line 158 of file JRange.hh.
◆ setRange() [3/6]
Set range.
The arguments could be values or iterators.
- Parameters
-
Definition at line 173 of file JRange.hh.
174 {
175 using namespace JLANG;
176
178 }
Auxiliary classes and methods for language specific functionality.
Auxiliary template class for type bool.
Data structure to check whether given data type is an iterator.
◆ setRange() [4/6]
Set lower and upper limit according to input data.
- Parameters
-
Definition at line 187 of file JRange.hh.
188 {
190
191 for (typename array_type<JElement_t, JAllocator_t>::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
193 }
194 }
◆ setRange() [5/6]
Set range.
- Parameters
-
| first | first |
| second | second |
| option | false |
Definition at line 576 of file JRange.hh.
◆ setRange() [6/6]
Set range.
- Parameters
-
| first | first |
| second | second |
| option | true |
Definition at line 590 of file JRange.hh.
◆ getLowerLimit()
Get lower limit.
- Returns
- lower limit
Definition at line 202 of file JRange.hh.
◆ getUpperLimit()
Get upper limit.
- Returns
- upper limit
Definition at line 213 of file JRange.hh.
◆ setLowerLimit()
Set lower limit.
- Parameters
-
Definition at line 224 of file JRange.hh.
◆ setUpperLimit()
Set upper limit.
- Parameters
-
Definition at line 235 of file JRange.hh.
◆ fixLowerLimit()
Fix lower limit.
The range is shifted to the given lower limit.
- Parameters
-
Definition at line 248 of file JRange.hh.
◆ fixUpperLimit()
Fix upper limit.
The range is shifted to the given upper limit.
- Parameters
-
Definition at line 262 of file JRange.hh.
◆ equals()
Equal method.
- Parameters
-
- Returns
- true if this range is equal to given range; else false
Definition at line 275 of file JRange.hh.
276 {
278 !this->compare(range.getLowerLimit(), this->getLowerLimit()) &&
279 !this->compare(this->getUpperLimit(), range.getUpperLimit()) &&
280 !this->compare(range.getUpperLimit(), this->getUpperLimit()));
281 }
◆ getLength()
Get length (difference between upper and lower limit).
- Returns
- length
Definition at line 289 of file JRange.hh.
◆ setLength()
Set length (difference between upper and lower limit).
- Parameters
-
Definition at line 300 of file JRange.hh.
◆ is_valid()
Check validity of range.
- Returns
- true if lower limit less than or equal to upper limit; else false
Definition at line 311 of file JRange.hh.
◆ in_range()
Test whether value is inside range.
- Parameters
-
- Returns
- true if lower limit <= value <= upper limit; else false
Definition at line 323 of file JRange.hh.
◆ operator()()
Test whether value is inside range.
- Parameters
-
- Returns
- true if lower limit <= value <= upper limit; else false
Definition at line 336 of file JRange.hh.
◆ constrain()
Constrain value to range.
This method returns the original value if it is in this range, else lower limit if value < lower limit or upper limit if value > upper limit.
- Parameters
-
- Returns
- lower limit <= x <= upper limit
Definition at line 350 of file JRange.hh.
◆ mod()
Modulo value with respect to range.
- Parameters
-
- Returns
- lower limit <= x <= upper limit
Definition at line 365 of file JRange.hh.
◆ overlap()
Test overlap with given range.
- Parameters
-
- Returns
- true if there is a non-zero overlap; else false
Definition at line 382 of file JRange.hh.
◆ include()
Include given value to range.
The new lower limit is the minimim of the original lower limit and given value and
the new upper limit is the maximum of the original upper limit and given value;
- Parameters
-
- Returns
- range
Definition at line 397 of file JRange.hh.
398 {
401
402 return *this;
403 }
◆ join()
Join ranges.
The new lower limit is the maximim of the two lower limits and
the new upper limit is the minimum of the two upper limits.
This operation results in an equal or smaller range and may result in an unphysical range (i.e. lower limit > upper limit).
- Parameters
-
Definition at line 415 of file JRange.hh.
416 {
419
420 return *this;
421 }
◆ combine()
Combine ranges.
The new lower limit is the minimim of the two lower limits and
the new upper limit is the maximum of the two upper limits.
This operation results in an equal or larger range.
- Parameters
-
Definition at line 432 of file JRange.hh.
433 {
436
437 return *this;
438 }
◆ add() [1/2]
Add offset.
- Parameters
-
Definition at line 446 of file JRange.hh.
447 {
450
451 return *this;
452 }
◆ add() [2/2]
Add offsets.
The new lower limit is the sum of the two lower limits and
the new upper limit is the sum of the two upper limits.
- Parameters
-
Definition at line 476 of file JRange.hh.
477 {
478 this->
first += range.getLowerLimit();
479 this->
second += range.getUpperLimit();
480
481 return *this;
482 }
◆ sub() [1/2]
Subtract offset.
- Parameters
-
Definition at line 460 of file JRange.hh.
461 {
464
465 return *this;
466 }
◆ sub() [2/2]
Subtract offsets.
The new lower limit is the difference of the two lower limits and
the new upper limit is the difference of the two upper limits.
- Parameters
-
Definition at line 492 of file JRange.hh.
493 {
494 this->
first -= range.getLowerLimit();
495 this->
second -= range.getUpperLimit();
496
497 return *this;
498 }
◆ mul() [1/2]
Multiply range.
- Parameters
-
Definition at line 506 of file JRange.hh.
507 {
508 this->
first *= factor;
510
511 return *this;
512 }
◆ mul() [2/2]
Multiply with object.
- Parameters
-
- Returns
- result object
Definition at line 354 of file JMath.hh.
355 {
356 return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357 }
◆ div()
Divide range.
- Parameters
-
Definition at line 520 of file JRange.hh.
521 {
522 this->
first /= factor;
524
525 return *this;
526 }
◆ getMinimum()
Get minimum possible value.
- Returns
- minimum possible value
Definition at line 534 of file JRange.hh.
535 {
537 }
float min()
Get minimum possible value.
◆ getMaximum()
Get maximum possible value.
- Returns
- maximum possible value
Definition at line 545 of file JRange.hh.
546 {
548 }
TTimeStamp max()
Get maximum possible value.
◆ DEFAULT_RANGE()
Default range.
This range corresponds to an unphysical range.
Definition at line 555 of file JRange.hh.
◆ getKey()
◆ getValue() [1/2]
◆ getValue() [2/2]
◆ operator>>
Read bin range from input.
- Parameters
-
| in | input stream |
| object | bin range |
- Returns
- input stream
Definition at line 113 of file JHondaFluxInterpolator.hh.
114 {
116
119
120 string buffer;
121
122 if (in >> min >> buffer >> max &&
123 min <= max &&
125 static_cast<JRange_t&
>(object) =
JRange_t(min, max);
126 }
127
128 return in;
129 }
static const char *const HONDA_BINSPECS_SEPARATOR
◆ compare
Function object for comparisons.
Definition at line 565 of file JRange.hh.
◆ first
◆ second
The documentation for this struct was generated from the following file: