Jpp  15.0.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
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. More...
 
bool operator() (const value_type &first, const value_type &second) const
 Test whether bins should be merged. More...
 

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

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

Definition at line 32 of file JHistogram1D.hh.

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

Definition at line 33 of file JHistogram1D.hh.

Constructor & Destructor Documentation

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:660
const int __n
Definition: JHistogram1D.hh:60

Member Function Documentation

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  }
const int __n
Definition: JHistogram1D.hh:60

Member Data Documentation

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

Definition at line 60 of file JHistogram1D.hh.

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: