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

Auxiliary class for merging of fixed number of consecutive bins. More...

#include <JHistogram1D.hh>

Public Types

typedef JElement_t value_type
 
typedef JElement_t::ordinate_type contents_type
 

Public Member Functions

 JRebin (const int n)
 Constructor.
 
bool operator() (const value_type &first, const value_type &second) const
 Test whether bins should be merged.
 

Private Attributes

const int __n
 
int __i
 

Detailed Description

template<class JElement_t>
struct JTOOLS::JRebin< JElement_t >

Auxiliary class for merging of fixed number of consecutive bins.

Definition at line 30 of file JHistogram1D.hh.

Member Typedef Documentation

◆ value_type

template<class JElement_t >
JElement_t JTOOLS::JRebin< JElement_t >::value_type

Definition at line 32 of file JHistogram1D.hh.

◆ contents_type

template<class JElement_t >
JElement_t::ordinate_type JTOOLS::JRebin< JElement_t >::contents_type

Definition at line 33 of file JHistogram1D.hh.

Constructor & Destructor Documentation

◆ JRebin()

template<class JElement_t >
JTOOLS::JRebin< JElement_t >::JRebin ( const int n)
inline

Constructor.

Parameters
nnumber of bins to merge

Definition at line 41 of file JHistogram1D.hh.

41 :
42 __n(n > 1 ? n : 1),
43 __i(0)
44 {}
const int n
Definition JPolint.hh:791

Member Function Documentation

◆ operator()()

template<class JElement_t >
bool JTOOLS::JRebin< JElement_t >::operator() ( const value_type & first,
const value_type & second ) const
inline

Test whether bins should be merged.

Parameters
firstfirst bin
secondsecond bin
Returns
true if bins should be merged; else false

Definition at line 54 of file JHistogram1D.hh.

55 {
56 return (__n != 1 && ++__i%__n != 0);
57 }

Member Data Documentation

◆ __n

template<class JElement_t >
const int JTOOLS::JRebin< JElement_t >::__n
private

Definition at line 60 of file JHistogram1D.hh.

◆ __i

template<class JElement_t >
int JTOOLS::JRebin< JElement_t >::__i
mutableprivate

Definition at line 61 of file JHistogram1D.hh.


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