Jpp
Public Types | Public 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...
 
void fill (const abscissa_type x,...)
 Multi-dimensional fill method call. More...
 

Protected Attributes

va_list ap
 
JArray< NUMBER_OF_DIMENSIONS, abscissa_typebuffer
 

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 35 of file JMultiHistogram.hh.

Member Typedef Documentation

◆ multimap_type

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 43 of file JMultiHistogram.hh.

◆ abscissa_type

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 47 of file JMultiHistogram.hh.

◆ ordinate_type

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 48 of file JMultiHistogram.hh.

◆ const_iterator

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 50 of file JMultiHistogram.hh.

◆ const_reverse_iterator

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 51 of file JMultiHistogram.hh.

◆ iterator

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 52 of file JMultiHistogram.hh.

◆ reverse_iterator

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 53 of file JMultiHistogram.hh.

◆ super_iterator

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 55 of file JMultiHistogram.hh.

◆ super_const_iterator

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 56 of file JMultiHistogram.hh.

◆ contents_type

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 58 of file JMultiHistogram.hh.

Member Enumeration Documentation

◆ anonymous enum

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 45 of file JMultiHistogram.hh.

45 { NUMBER_OF_DIMENSIONS = JMapLength<JMaplist_t>::value + JHistogram_t::NUMBER_OF_DIMENSIONS };

Constructor & Destructor Documentation

◆ JMultiHistogram()

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 64 of file JMultiHistogram.hh.

65  {}

Member Function Documentation

◆ getMultiHistogram() [1/2]

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 73 of file JMultiHistogram.hh.

74  {
75  return static_cast<const JMultiHistogram&>(*this);
76  }

◆ getMultiHistogram() [2/2]

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 84 of file JMultiHistogram.hh.

85  {
86  return static_cast<JMultiHistogram&>(*this);
87  }

◆ fill()

template<class JHistogram_t, class JMaplist_t, class JDistance_t = JDistance<typename JHistogram_t::abscissa_type>>
void JTOOLS::JMultiHistogram< JHistogram_t, JMaplist_t, JDistance_t >::fill ( const abscissa_type  x,
  ... 
)
inline

Multi-dimensional fill method call.

Parameters
xcomma seperated argument list

Definition at line 95 of file JMultiHistogram.hh.

96  {
97  va_start(ap, x);
98 
99  buffer[0] = x;
100 
101  for (int i = 1; i != NUMBER_OF_DIMENSIONS; ++i) {
102  buffer[i] = va_arg(ap, abscissa_type);
103  }
104 
105  const contents_type w = va_arg(ap, contents_type);
106 
107  va_end(ap);
108 
109  this->evaluate(buffer.begin(), w);
110  }

Member Data Documentation

◆ ap

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

Definition at line 114 of file JMultiHistogram.hh.

◆ buffer

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 115 of file JMultiHistogram.hh.


The documentation for this class was generated from the following file:
JTOOLS::JMultiHistogram::contents_type
JHistogram_t::contents_type contents_type
Definition: JMultiHistogram.hh:58
JTOOLS::JArray::begin
const_iterator begin() const
get iterator to begin of data
Definition: JArray.hh:188
JTOOLS::w
data_type w[N+1][M+1]
Definition: JPolint.hh:708
JTOOLS::JMultiHistogram::NUMBER_OF_DIMENSIONS
Definition: JMultiHistogram.hh:45
JTOOLS::JMultiHistogram::abscissa_type
multimap_type::abscissa_type abscissa_type
Definition: JMultiHistogram.hh:47
JTOOLS::JMapLength
Length of map list.
Definition: JMapList.hh:45
JTOOLS::JMultiHistogram::ap
va_list ap
Definition: JMultiHistogram.hh:114
JTOOLS::JMultiHistogram::buffer
JArray< NUMBER_OF_DIMENSIONS, abscissa_type > buffer
Definition: JMultiHistogram.hh:115