Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JTOOLS::JAbstractHistogram< JAbscissa_t > Struct Template Reference

Simple data structure for histogram binning. More...

#include <JAbstractHistogram.hh>

Inheritance diagram for JTOOLS::JAbstractHistogram< JAbscissa_t >:
JTOOLS::JRange< JAbscissa_t > JTOOLS::JPair< JAbscissa_t, JAbscissa_t > JLANG::JEquals< JFirst_t, JSecond_t > JMATH::JMath< JFirst_t, JSecond_t >

Public Types

typedef JAbscissa_t abscissa_type
 
typedef JRange< abscissa_typerange_type
 
typedef std::pair< JAbscissa_t, JAbscissa_t > pair_type
 
typedef JLANG::JClass< JAbscissa_t >::argument_type argument_type
 
typedef JAbscissa_t key_type
 
typedef JAbscissa_t mapped_type
 

Public Member Functions

 JAbstractHistogram ()
 Default constructor.
 
 JAbstractHistogram (const int nx, const abscissa_type xmin, const abscissa_type xmax)
 Constructor.
 
 JAbstractHistogram (const abscissa_type xmin, const abscissa_type xmax)
 Constructor.
 
int getNumberOfBins () const
 Get number of bins.
 
double getBinWidth () const
 Get bin width.
 
void setBinWidth (const abscissa_type dx, int option=0)
 Set bin width.
 
bool is_valid () const
 Check validity of histogram binning.
 
 operator JGrid< abscissa_type > () const
 Type conversion operator.
 
 operator pair_type () const
 Type conversion operator.
 
const range_typegetRange () const
 Get range.
 
void setRange (const range_type &range)
 Set range.
 
void setRange (argument_type x, argument_type y)
 Set lower and upper limit.
 
void setRange (R first, R second)
 Set range.
 
void setRange (const array_type< JElement_t, JAllocator_t > &buffer)
 Set lower and upper limit according to input data.
 
JAbscissa_t getLowerLimit () const
 Get lower limit.
 
JAbscissa_t getUpperLimit () const
 Get upper limit.
 
void setLowerLimit (argument_type x)
 Set lower limit.
 
void setUpperLimit (argument_type y)
 Set upper limit.
 
void fixLowerLimit (argument_type x)
 Fix lower limit.
 
void fixUpperLimit (argument_type y)
 Fix upper limit.
 
bool equals (const range_type &range) const
 Equal method.
 
JAbscissa_t getLength () const
 Get length (difference between upper and lower limit).
 
void setLength (argument_type length)
 Set length (difference between upper and lower limit).
 
bool in_range (argument_type x) const
 Test whether value is inside range.
 
bool operator() (argument_type x) const
 Test whether value is inside range.
 
JAbscissa_t constrain (argument_type x) const
 Constrain value to range.
 
JAbscissa_t mod (argument_type x) const
 Modulo value with respect to range.
 
bool overlap (const range_type &range) const
 Test overlap with given range.
 
range_typeinclude (argument_type x)
 Include given value to range.
 
range_typejoin (const range_type &range)
 Join ranges.
 
range_typecombine (const range_type &range)
 Combine ranges.
 
range_typeadd (argument_type x)
 Add offset.
 
range_typeadd (const range_type &range)
 Add offsets.
 
range_typesub (argument_type x)
 Subtract offset.
 
range_typesub (const range_type &range)
 Subtract offsets.
 
range_typemul (const double factor)
 Multiply range.
 
JFirst_t & mul (const JSecond_t &object)
 Multiply with object.
 
range_typediv (const double factor)
 Divide range.
 
const key_typegetKey () const
 
const mapped_typegetValue () const
 
mapped_typegetValue ()
 

Static Public Member Functions

static JAbscissa_t getMinimum ()
 Get minimum possible value.
 
static JAbscissa_t getMaximum ()
 Get maximum possible value.
 
static JRange< JAbscissa_t, std::less< JAbscissa_t > > DEFAULT_RANGE ()
 Default range.
 

Public Attributes

std::less< JAbscissa_t > compare
 Function object for comparisons.
 
JAbscissa_t first
 
JAbscissa_t second
 

Protected Member Functions

void setRange (R first, R second, const JLANG::JBool< false > &option)
 Set range.
 
void setRange (R first, R second, const JLANG::JBool< true > &option)
 Set range.
 

Protected Attributes

int number_of_bins
 

Friends

std::istream & operator>> (std::istream &in, JAbstractHistogram< JAbscissa_t > &histogram)
 Read histogram from input.
 
std::ostream & operator<< (std::ostream &out, const JAbstractHistogram< JAbscissa_t > &histogram)
 Write histogram to output.
 

Detailed Description

template<class JAbscissa_t>
struct JTOOLS::JAbstractHistogram< JAbscissa_t >

Simple data structure for histogram binning.

Definition at line 24 of file JAbstractHistogram.hh.

Member Typedef Documentation

◆ abscissa_type

template<class JAbscissa_t >
JAbscissa_t JTOOLS::JAbstractHistogram< JAbscissa_t >::abscissa_type

Definition at line 28 of file JAbstractHistogram.hh.

◆ range_type

template<class JAbscissa_t >
JRange<abscissa_type> JTOOLS::JAbstractHistogram< JAbscissa_t >::range_type

Definition at line 29 of file JAbstractHistogram.hh.

◆ pair_type

std::pair<JAbscissa_t,JAbscissa_t> JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::pair_type
inherited

Definition at line 45 of file JRange.hh.

◆ argument_type

JLANG::JClass<JAbscissa_t>::argument_type JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::argument_type
inherited

Definition at line 47 of file JRange.hh.

◆ key_type

JAbscissa_t JTOOLS::JPair< JAbscissa_t, JAbscissa_t >::key_type
inherited

Definition at line 32 of file JPair.hh.

◆ mapped_type

JAbscissa_t JTOOLS::JPair< JAbscissa_t, JAbscissa_t >::mapped_type
inherited

Definition at line 33 of file JPair.hh.

Constructor & Destructor Documentation

◆ JAbstractHistogram() [1/3]

template<class JAbscissa_t >
JTOOLS::JAbstractHistogram< JAbscissa_t >::JAbstractHistogram ( )
inline

Default constructor.

Definition at line 35 of file JAbstractHistogram.hh.

35 :
36 JRange<JAbscissa_t>(),
38 {}

◆ JAbstractHistogram() [2/3]

template<class JAbscissa_t >
JTOOLS::JAbstractHistogram< JAbscissa_t >::JAbstractHistogram ( const int nx,
const abscissa_type xmin,
const abscissa_type xmax )
inline

Constructor.

Parameters
nxnumber of bins
xminlower limit
xmaxupper limit

Definition at line 48 of file JAbstractHistogram.hh.

50 :
51 JRange<JAbscissa_t>(xmin, xmax),
53 {}

◆ JAbstractHistogram() [3/3]

template<class JAbscissa_t >
JTOOLS::JAbstractHistogram< JAbscissa_t >::JAbstractHistogram ( const abscissa_type xmin,
const abscissa_type xmax )
inline

Constructor.

Parameters
xminlower limit
xmaxupper limit

Definition at line 62 of file JAbstractHistogram.hh.

63 :
64 JRange<JAbscissa_t>(xmin, xmax),
66 {}

Member Function Documentation

◆ getNumberOfBins()

template<class JAbscissa_t >
int JTOOLS::JAbstractHistogram< JAbscissa_t >::getNumberOfBins ( ) const
inline

Get number of bins.

Returns
number of bins

Definition at line 74 of file JAbstractHistogram.hh.

75 {
76 return number_of_bins;
77 }

◆ getBinWidth()

template<class JAbscissa_t >
double JTOOLS::JAbstractHistogram< JAbscissa_t >::getBinWidth ( ) const
inline

Get bin width.

Returns
bin width

Definition at line 85 of file JAbstractHistogram.hh.

86 {
87 return this->getLength() / this->getNumberOfBins();
88 }
JAbscissa_t getLength() const
Definition JRange.hh:289
int getNumberOfBins() const
Get number of bins.

◆ setBinWidth()

template<class JAbscissa_t >
void JTOOLS::JAbstractHistogram< JAbscissa_t >::setBinWidth ( const abscissa_type dx,
int option = 0 )
inline

Set bin width.

If option < 0, adjust lower limit; if option > 0, adjust upper limit; else no adjustments.

Parameters
dxbin width
optionoption

Definition at line 99 of file JAbstractHistogram.hh.

100 {
101 number_of_bins = (int) (this->getLength() / dx);
102
103 if (option < 0) { this->setLowerLimit(this->getUpperLimit() - number_of_bins + dx); }
104 if (option > 0) { this->setUpperLimit(this->getLowerLimit() + number_of_bins + dx); }
105 }
void setUpperLimit(argument_type y)
Definition JRange.hh:235
JAbscissa_t getLowerLimit() const
Definition JRange.hh:202
void setLowerLimit(argument_type x)
Definition JRange.hh:224
JAbscissa_t getUpperLimit() const
Definition JRange.hh:213

◆ is_valid()

template<class JAbscissa_t >
bool JTOOLS::JAbstractHistogram< JAbscissa_t >::is_valid ( ) const
inline

Check validity of histogram binning.

Returns
true if both range and number of bins are valid; else false

Definition at line 113 of file JAbstractHistogram.hh.

114 {
115 return static_cast<const range_type&>(*this).is_valid() && number_of_bins > 0;
116 }
bool is_valid() const
Check validity of range.
Definition JRange.hh:311
JRange< abscissa_type > range_type

◆ operator JGrid< abscissa_type >()

template<class JAbscissa_t >
JTOOLS::JAbstractHistogram< JAbscissa_t >::operator JGrid< abscissa_type > ( ) const
inline

Type conversion operator.

Returns
grid

Definition at line 124 of file JAbstractHistogram.hh.

125 {
126 return make_grid(this->getNumberOfBins() + 1, this->getLowerLimit(), this->getUpperLimit());
127 }
JGrid< JAbscissa_t > make_grid(const int nx, const JAbscissa_t Xmin, const JAbscissa_t Xmax)
Helper method for JGrid.
Definition JGrid.hh:209

◆ operator pair_type()

JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::operator pair_type ( ) const
inlineinherited

Type conversion operator.

Returns
piar

Definition at line 124 of file JRange.hh.

125 {
127 }
std::pair< JAbscissa_t, JAbscissa_t > pair_type
Definition JRange.hh:45

◆ getRange()

const range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::getRange ( ) const
inlineinherited

Get range.

Returns
range

Definition at line 135 of file JRange.hh.

136 {
137 return static_cast<const range_type&>(*this);
138 }
JRange< JAbscissa_t, std::less< JAbscissa_t > > range_type
Definition JRange.hh:46

◆ setRange() [1/6]

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::setRange ( const range_type & range)
inlineinherited

Set range.

Parameters
rangerange

Definition at line 146 of file JRange.hh.

147 {
148 static_cast<range_type&>(*this) = range;
149 }

◆ setRange() [2/6]

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::setRange ( argument_type x,
argument_type y )
inlineinherited

Set lower and upper limit.

Parameters
xlower limit
yupper limit

Definition at line 158 of file JRange.hh.

◆ setRange() [3/6]

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::setRange ( R first,
R second )
inlineinherited

Set range.


The arguments could be values or iterators.

Parameters
firstfirst
secondsecond

Definition at line 173 of file JRange.hh.

174 {
175 using namespace JLANG;
176
178 }
void setRange(const range_type &range)
Definition JRange.hh:146
Auxiliary classes and methods for language specific functionality.
Auxiliary template class for type bool.
Definition JBool.hh:21
Data structure to check whether given data type is an iterator.
Definition JClass.hh:62

◆ setRange() [4/6]

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::setRange ( const array_type< JElement_t, JAllocator_t > & buffer)
inlineinherited

Set lower and upper limit according to input data.

Parameters
bufferinput data

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) {
192 include(*i);
193 }
194 }
range_type & include(argument_type x)
Definition JRange.hh:397
static JAbscissa_t getMaximum()
Definition JRange.hh:545
static JAbscissa_t getMinimum()
Definition JRange.hh:534

◆ setRange() [5/6]

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::setRange ( R first,
R second,
const JLANG::JBool< false > & option )
inlineprotectedinherited

Set range.

Parameters
firstfirst
secondsecond
optionfalse

Definition at line 576 of file JRange.hh.

577 {
579 }
JLANG::JClass< JAbscissa_t >::argument_type argument_type
Definition JRange.hh:47

◆ setRange() [6/6]

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::setRange ( R first,
R second,
const JLANG::JBool< true > & option )
inlineprotectedinherited

Set range.

Parameters
firstfirst
secondsecond
optiontrue

Definition at line 590 of file JRange.hh.

591 {
593
594 for (R i = first; i != second; ++i) {
595 include(*i);
596 }
597 }

◆ getLowerLimit()

JAbscissa_t JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::getLowerLimit ( ) const
inlineinherited

Get lower limit.

Returns
lower limit

Definition at line 202 of file JRange.hh.

203 {
204 return this->first;
205 }

◆ getUpperLimit()

JAbscissa_t JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::getUpperLimit ( ) const
inlineinherited

Get upper limit.

Returns
upper limit

Definition at line 213 of file JRange.hh.

214 {
215 return this->second;
216 }

◆ setLowerLimit()

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::setLowerLimit ( argument_type x)
inlineinherited

Set lower limit.

Parameters
xlower limit

Definition at line 224 of file JRange.hh.

225 {
226 this->first = x;
227 }

◆ setUpperLimit()

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::setUpperLimit ( argument_type y)
inlineinherited

Set upper limit.

Parameters
yupper limit

Definition at line 235 of file JRange.hh.

236 {
237 this->second = y;
238 }

◆ fixLowerLimit()

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::fixLowerLimit ( argument_type x)
inlineinherited

Fix lower limit.

The range is shifted to the given lower limit.

Parameters
xlower limit

Definition at line 248 of file JRange.hh.

249 {
250 this->second += x - this->first;
251 this->first = x;
252 }

◆ fixUpperLimit()

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::fixUpperLimit ( argument_type y)
inlineinherited

Fix upper limit.

The range is shifted to the given upper limit.

Parameters
yupper limit

Definition at line 262 of file JRange.hh.

263 {
264 this->first += y - this->second;
265 this->second = y;
266 }

◆ equals()

bool JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::equals ( const range_type & range) const
inlineinherited

Equal method.

Parameters
rangerange
Returns
true if this range is equal to given range; else false

Definition at line 275 of file JRange.hh.

276 {
277 return (!this->compare(this->getLowerLimit(), range.getLowerLimit()) &&
278 !this->compare(range.getLowerLimit(), this->getLowerLimit()) &&
279 !this->compare(this->getUpperLimit(), range.getUpperLimit()) &&
280 !this->compare(range.getUpperLimit(), this->getUpperLimit()));
281 }
std::less< JAbscissa_t > compare
Definition JRange.hh:565

◆ getLength()

JAbscissa_t JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::getLength ( ) const
inlineinherited

Get length (difference between upper and lower limit).

Returns
length

Definition at line 289 of file JRange.hh.

290 {
291 return getUpperLimit() - getLowerLimit();
292 }

◆ setLength()

void JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::setLength ( argument_type length)
inlineinherited

Set length (difference between upper and lower limit).

Parameters
lengthlength

Definition at line 300 of file JRange.hh.

301 {
302 setUpperLimit(getLowerLimit() + length);
303 }

◆ in_range()

bool JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::in_range ( argument_type x) const
inlineinherited

Test whether value is inside range.

Parameters
xvalue
Returns
true if lower limit <= value <= upper limit; else false

Definition at line 323 of file JRange.hh.

324 {
325 return (!compare(x, getLowerLimit()) &&
326 !compare(getUpperLimit(), x));
327 }

◆ operator()()

bool JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::operator() ( argument_type x) const
inlineinherited

Test whether value is inside range.

Parameters
xvalue
Returns
true if lower limit <= value <= upper limit; else false

Definition at line 336 of file JRange.hh.

337 {
338 return in_range(x);
339 }
bool in_range(argument_type x) const
Definition JRange.hh:323

◆ constrain()

JAbscissa_t JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::constrain ( argument_type x) const
inlineinherited

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
xvalue
Returns
lower limit <= x <= upper limit

Definition at line 350 of file JRange.hh.

351 {
352 if (compare(x, getLowerLimit())) { return getLowerLimit(); }
353 if (compare(getUpperLimit(), x)) { return getUpperLimit(); }
354
355 return x;
356 }

◆ mod()

JAbscissa_t JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::mod ( argument_type x) const
inlineinherited

Modulo value with respect to range.


Parameters
xvalue
Returns
lower limit <= x <= upper limit

Definition at line 365 of file JRange.hh.

366 {
367 if (compare(x, getLowerLimit()))
368 return x + getLength() * floor((getUpperLimit() - x) / getLength());
369 else if (compare(getUpperLimit(), x))
370 return x - getLength() * floor((x - getLowerLimit()) / getLength());
371 else
372 return x;
373 }

◆ overlap()

bool JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::overlap ( const range_type & range) const
inlineinherited

Test overlap with given range.


Parameters
rangerange
Returns
true if there is a non-zero overlap; else false

Definition at line 382 of file JRange.hh.

383 {
384 return (!compare(range.getUpperLimit(), getLowerLimit()) &&
385 !compare(getUpperLimit(), range.getLowerLimit()));
386 }

◆ include()

range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::include ( argument_type x)
inlineinherited

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
xvalue
Returns
range

Definition at line 397 of file JRange.hh.

398 {
399 if (compare(x, getLowerLimit())) { setLowerLimit(x); }
400 if (compare(getUpperLimit(), x)) { setUpperLimit(x); }
401
402 return *this;
403 }

◆ join()

range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::join ( const range_type & range)
inlineinherited

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
rangerange

Definition at line 415 of file JRange.hh.

416 {
417 if (compare(getLowerLimit(), range.getLowerLimit())) { setLowerLimit(range.getLowerLimit()); }
418 if (compare(range.getUpperLimit(), getUpperLimit())) { setUpperLimit(range.getUpperLimit()); }
419
420 return *this;
421 }

◆ combine()

range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::combine ( const range_type & range)
inlineinherited

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
rangerange

Definition at line 432 of file JRange.hh.

433 {
434 if (compare(range.getLowerLimit(), getLowerLimit())) { setLowerLimit(range.getLowerLimit()); }
435 if (compare(getUpperLimit(), range.getUpperLimit())) { setUpperLimit(range.getUpperLimit()); }
436
437 return *this;
438 }

◆ add() [1/2]

range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::add ( argument_type x)
inlineinherited

Add offset.

Parameters
xoffset

Definition at line 446 of file JRange.hh.

447 {
448 this->first += x;
449 this->second += x;
450
451 return *this;
452 }

◆ add() [2/2]

range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::add ( const range_type & range)
inlineinherited

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
rangeoffset

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]

range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::sub ( argument_type x)
inlineinherited

Subtract offset.

Parameters
xoffset

Definition at line 460 of file JRange.hh.

461 {
462 this->first -= x;
463 this->second -= x;
464
465 return *this;
466 }

◆ sub() [2/2]

range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::sub ( const range_type & range)
inlineinherited

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
rangeoffset

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]

range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::mul ( const double factor)
inlineinherited

Multiply range.

Parameters
factorfactor

Definition at line 506 of file JRange.hh.

507 {
508 this->first *= factor;
509 this->second *= factor;
510
511 return *this;
512 }

◆ mul() [2/2]

template<class JFirst_t , class JSecond_t >
JFirst_t & JMATH::JMath< JFirst_t, JSecond_t >::mul ( const JSecond_t & object)
inlineinherited

Multiply with object.

Parameters
objectobject
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()

range_type & JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::div ( const double factor)
inlineinherited

Divide range.

Parameters
factorfactor

Definition at line 520 of file JRange.hh.

521 {
522 this->first /= factor;
523 this->second /= factor;
524
525 return *this;
526 }

◆ getMinimum()

static JAbscissa_t JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::getMinimum ( )
inlinestaticinherited

Get minimum possible value.

Returns
minimum possible value

Definition at line 534 of file JRange.hh.

535 {
536 return JMATH::JLimits<T>::min();
537 }
float min()
Get minimum possible value.
Definition JLimits.hh:96

◆ getMaximum()

static JAbscissa_t JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::getMaximum ( )
inlinestaticinherited

Get maximum possible value.

Returns
maximum possible value

Definition at line 545 of file JRange.hh.

546 {
547 return JMATH::JLimits<T>::max();
548 }
TTimeStamp max()
Get maximum possible value.

◆ DEFAULT_RANGE()

static JRange< JAbscissa_t, std::less<JAbscissa_t> > JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::DEFAULT_RANGE ( )
inlinestaticinherited

Default range.

This range corresponds to an unphysical range.

Definition at line 555 of file JRange.hh.

◆ getKey()

const key_type & JTOOLS::JPair< JAbscissa_t, JAbscissa_t >::getKey ( ) const
inlineinherited

Definition at line 123 of file JPair.hh.

123{ return this->first; }

◆ getValue() [1/2]

const mapped_type & JTOOLS::JPair< JAbscissa_t, JAbscissa_t >::getValue ( ) const
inlineinherited

Definition at line 124 of file JPair.hh.

124{ return this->second; }

◆ getValue() [2/2]

mapped_type & JTOOLS::JPair< JAbscissa_t, JAbscissa_t >::getValue ( )
inlineinherited

Definition at line 126 of file JPair.hh.

126{ return this->second; }

Friends And Related Symbol Documentation

◆ operator>>

template<class JAbscissa_t >
std::istream & operator>> ( std::istream & in,
JAbstractHistogram< JAbscissa_t > & histogram )
friend

Read histogram from input.

Parameters
ininput stream
histogramhistogram
Returns
input stream

Definition at line 137 of file JAbstractHistogram.hh.

138 {
139 return in >> histogram.number_of_bins >> static_cast<range_type&>(histogram);
140 }

◆ operator<<

template<class JAbscissa_t >
std::ostream & operator<< ( std::ostream & out,
const JAbstractHistogram< JAbscissa_t > & histogram )
friend

Write histogram to output.

Parameters
outoutput stream
histogramhistogram
Returns
output stream

Definition at line 150 of file JAbstractHistogram.hh.

151 {
152 return out << histogram.number_of_bins << ' ' << static_cast<const range_type&>(histogram);
153 }

Member Data Documentation

◆ number_of_bins

template<class JAbscissa_t >
int JTOOLS::JAbstractHistogram< JAbscissa_t >::number_of_bins
protected

Definition at line 156 of file JAbstractHistogram.hh.

◆ compare

std::less<JAbscissa_t> JTOOLS::JRange< JAbscissa_t, std::less<JAbscissa_t> >::compare
inherited

Function object for comparisons.

Definition at line 565 of file JRange.hh.

◆ first

JAbscissa_t JTOOLS::JPair< JAbscissa_t, JAbscissa_t >::first
inherited

Definition at line 128 of file JPair.hh.

◆ second

JAbscissa_t JTOOLS::JPair< JAbscissa_t, JAbscissa_t >::second
inherited

Definition at line 129 of file JPair.hh.


The documentation for this struct was generated from the following file: