Jpp test-rotations-old
the software that should make you happy
|
Simple data structure for histogram binning. More...
#include <JAbstractHistogram.hh>
Public Types | |
typedef JAbscissa_t | abscissa_type |
typedef JRange< abscissa_type > | range_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_type & | getRange () 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_type & | include (argument_type x) |
Include given value to range. | |
range_type & | join (const range_type &range) |
Join ranges. | |
range_type & | combine (const range_type &range) |
Combine ranges. | |
range_type & | add (argument_type x) |
Add offset. | |
range_type & | add (const range_type &range) |
Add offsets. | |
range_type & | sub (argument_type x) |
Subtract offset. | |
range_type & | sub (const range_type &range) |
Subtract offsets. | |
range_type & | mul (const double factor) |
Multiply range. | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. | |
range_type & | div (const double factor) |
Divide range. | |
const key_type & | getKey () const |
const mapped_type & | getValue () const |
mapped_type & | getValue () |
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. | |
Simple data structure for histogram binning.
Definition at line 24 of file JAbstractHistogram.hh.
JAbscissa_t JTOOLS::JAbstractHistogram< JAbscissa_t >::abscissa_type |
Definition at line 28 of file JAbstractHistogram.hh.
JRange<abscissa_type> JTOOLS::JAbstractHistogram< JAbscissa_t >::range_type |
Definition at line 29 of file JAbstractHistogram.hh.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inline |
Default constructor.
Definition at line 35 of file JAbstractHistogram.hh.
|
inline |
Constructor.
nx | number of bins |
xmin | lower limit |
xmax | upper limit |
Definition at line 48 of file JAbstractHistogram.hh.
|
inline |
Constructor.
xmin | lower limit |
xmax | upper limit |
Definition at line 62 of file JAbstractHistogram.hh.
|
inline |
|
inline |
Get bin width.
Definition at line 85 of file JAbstractHistogram.hh.
|
inline |
Set bin width.
If option < 0
, adjust lower limit; if option > 0
, adjust upper limit; else no adjustments.
dx | bin width |
option | option |
Definition at line 99 of file JAbstractHistogram.hh.
|
inline |
Check validity of histogram binning.
Definition at line 113 of file JAbstractHistogram.hh.
|
inline |
Type conversion operator.
Definition at line 124 of file JAbstractHistogram.hh.
|
inlineinherited |
Type conversion operator.
|
inlineinherited |
Get range.
|
inlineinherited |
Set range.
range | range |
|
inlineinherited |
|
inlineinherited |
Set range.
The arguments could be values or iterators.
first | first |
second | second |
Definition at line 173 of file JRange.hh.
|
inlineinherited |
|
inlineprotectedinherited |
Set range.
first | first |
second | second |
option | false |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Equal method.
range | range |
Definition at line 275 of file JRange.hh.
|
inlineinherited |
Get length (difference between upper and lower limit).
|
inlineinherited |
Set length (difference between upper and lower limit).
length | length |
|
inlineinherited |
Test whether value is inside range.
x | value |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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).
range | range |
Definition at line 415 of file JRange.hh.
|
inlineinherited |
|
inlineinherited |
|
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.
range | offset |
|
inlineinherited |
|
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.
range | offset |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlinestaticinherited |
Get maximum possible value.
|
inlinestaticinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
friend |
Read histogram from input.
in | input stream |
histogram | histogram |
Definition at line 137 of file JAbstractHistogram.hh.
|
friend |
Write histogram to output.
out | output stream |
histogram | histogram |
Definition at line 150 of file JAbstractHistogram.hh.
|
protected |
Definition at line 156 of file JAbstractHistogram.hh.
|
inherited |
|
inherited |
|
inherited |