Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t > Class Template Reference

Multidimensional histogram. More...

#include <JMultiHistogram.hh>

Inheritance diagram for JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >:
JTOOLS::JMultiMap< JHistogram_t::abscissa_type, JHistogram_t, JMaplist_t, JDistance_t > JTOOLS::JTransformableMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >

Public Types

enum  { NUMBER_OF_DIMENSIONS = JMapLength<JMaplist_t>::value + JHistogram_t::NUMBER_OF_DIMENSIONS }
 
typedef JMultiMap< typename
JHistogram_t::abscissa_type,
JHistogram_t, JMaplist_t,
JDistance_t > 
multimap_type
 
typedef
multimap_type::abscissa_type 
abscissa_type
 
typedef
multimap_type::ordinate_type 
ordinate_type
 
typedef
multimap_type::const_iterator 
const_iterator
 
typedef
multimap_type::const_reverse_iterator 
const_reverse_iterator
 
typedef multimap_type::iterator iterator
 
typedef
multimap_type::reverse_iterator 
reverse_iterator
 
typedef
multimap_type::super_iterator 
super_iterator
 
typedef
multimap_type::super_const_iterator 
super_const_iterator
 
typedef JHistogram_t::contents_type contents_type
 

Public Member Functions

 JMultiHistogram ()
 Default constructor. More...
 
const JMultiHistogramgetMultiHistogram () const
 Get multidimensional histogram. More...
 
JMultiHistogramgetMultiHistogram ()
 Get multidimensional histogram. More...
 
template<class... Args>
void fill (const Args &...args)
 Multi-dimensional fill method call. More...
 

Protected Member Functions

template<class... Args>
void __fill__ (const int i, const abscissa_type x0, const abscissa_type x1, const Args &...args)
 Recursive method for filling histogram. More...
 
virtual void __fill__ (const int i, const abscissa_type x, const contents_type w)
 Termination method for filling histogram. More...
 

Protected Attributes

JArray< NUMBER_OF_DIMENSIONS,
abscissa_type
buffer
 

Detailed Description

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
class JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >

Multidimensional histogram.

The template parameters respectively refer to:

  1. histogram object used for the lowest dimension(s);
  2. list of histogram maps used for the higher dimension(s); and
  3. distance operator.

The number of dimensions of this histogram object is equal to the length of the given map list plus the extra dimensions of the first histogram object.

Definition at line 33 of file JMultiHistogram.hh.

Member Typedef Documentation

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef JMultiMap<typename JHistogram_t::abscissa_type, JHistogram_t, JMaplist_t, JDistance_t> JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::multimap_type

Definition at line 41 of file JMultiHistogram.hh.

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef multimap_type::abscissa_type JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::abscissa_type

Definition at line 45 of file JMultiHistogram.hh.

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef multimap_type::ordinate_type JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::ordinate_type

Definition at line 46 of file JMultiHistogram.hh.

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef multimap_type::const_iterator JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::const_iterator

Definition at line 48 of file JMultiHistogram.hh.

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef multimap_type::const_reverse_iterator JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::const_reverse_iterator

Definition at line 49 of file JMultiHistogram.hh.

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef multimap_type::iterator JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::iterator

Definition at line 50 of file JMultiHistogram.hh.

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef multimap_type::reverse_iterator JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::reverse_iterator

Definition at line 51 of file JMultiHistogram.hh.

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef multimap_type::super_iterator JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::super_iterator

Definition at line 53 of file JMultiHistogram.hh.

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef multimap_type::super_const_iterator JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::super_const_iterator

Definition at line 54 of file JMultiHistogram.hh.

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
typedef JHistogram_t::contents_type JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::contents_type

Definition at line 56 of file JMultiHistogram.hh.

Member Enumeration Documentation

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
anonymous enum
Enumerator
NUMBER_OF_DIMENSIONS 

Definition at line 43 of file JMultiHistogram.hh.

Constructor & Destructor Documentation

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::JMultiHistogram ( )
inline

Default constructor.

Definition at line 62 of file JMultiHistogram.hh.

63  {}

Member Function Documentation

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
const JMultiHistogram& JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::getMultiHistogram ( ) const
inline

Get multidimensional histogram.

Returns
this multidimensional histogram

Definition at line 71 of file JMultiHistogram.hh.

72  {
73  return static_cast<const JMultiHistogram&>(*this);
74  }
Multidimensional histogram.
template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
JMultiHistogram& JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::getMultiHistogram ( )
inline

Get multidimensional histogram.

Returns
this multidimensional histogram

Definition at line 82 of file JMultiHistogram.hh.

83  {
84  return static_cast<JMultiHistogram&>(*this);
85  }
Multidimensional histogram.
template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
template<class... Args>
void JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::fill ( const Args &...  args)
inline

Multi-dimensional fill method call.

Parameters
argscomma seperated list of abscissa values and weight

Definition at line 94 of file JMultiHistogram.hh.

95  {
96  __fill__(0, args...);
97  }
void __fill__(const int i, const abscissa_type x0, const abscissa_type x1, const Args &...args)
Recursive method for filling histogram.
template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
template<class... Args>
void JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::__fill__ ( const int  i,
const abscissa_type  x0,
const abscissa_type  x1,
const Args &...  args 
)
inlineprotected

Recursive method for filling histogram.

Parameters
iindex
x0value at given index
x1value at following index
argsremaining values and weight

Definition at line 110 of file JMultiHistogram.hh.

111  {
112  this->buffer[i] = x0;
113 
114  __fill__(i + 1, x1, args...);
115  }
void __fill__(const int i, const abscissa_type x0, const abscissa_type x1, const Args &...args)
Recursive method for filling histogram.
JArray< NUMBER_OF_DIMENSIONS, abscissa_type > buffer
template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
virtual void JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::__fill__ ( const int  i,
const abscissa_type  x,
const contents_type  w 
)
inlineprotectedvirtual

Termination method for filling histogram.

Parameters
iindex
xvalue at given index
wweight

Reimplemented in JTOOLS::JTransformableMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >.

Definition at line 124 of file JMultiHistogram.hh.

125  {
126  this->buffer[i] = x;
127 
128  this->evaluate(this->buffer.data(), w);
129  }
data_type w[N+1][M+1]
Definition: JPolint.hh:741
JArray< NUMBER_OF_DIMENSIONS, abscissa_type > buffer
const_pointer data() const
Get pointer to data.
Definition: JArray.hh:282

Member Data Documentation

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
JArray<NUMBER_OF_DIMENSIONS, abscissa_type> JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::buffer
mutableprotected

Definition at line 131 of file JMultiHistogram.hh.


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