Jpp  15.0.5
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 Attributes | Friends | List of all members
JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t > Class Template Referenceabstract

Histogram map. More...

#include <JHistogramMap.hh>

Inheritance diagram for JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >:
JTOOLS::JHistogram< JAbscissa_t, JContents_t::contents_type >

Public Types

typedef JMap_t< JAbscissa_t,
JContents_t, JDistance_t > 
collection_type
 
typedef JHistogram
< JAbscissa_t, typename
JContents_t::contents_type > 
histogram_type
 
typedef
collection_type::abscissa_type 
abscissa_type
 
typedef
collection_type::ordinate_type 
ordinate_type
 
typedef collection_type::value_type value_type
 
typedef
collection_type::const_iterator 
const_iterator
 
typedef
collection_type::const_reverse_iterator 
const_reverse_iterator
 
typedef collection_type::iterator iterator
 
typedef
collection_type::reverse_iterator 
reverse_iterator
 
typedef
histogram_type::contents_type 
contents_type
 

Public Member Functions

 JHistogramMap ()
 Default constructor. More...
 
virtual void evaluate (const abscissa_type *pX, typename JLANG::JClass< contents_type >::argument_type w)
 Fill histogram. More...
 
JHistogramMapmul (typename JLANG::JClass< contents_type >::argument_type factor)
 Scale contents. More...
 
JHistogramMapdiv (typename JLANG::JClass< contents_type >::argument_type factor)
 Scale contents. More...
 
virtual void evaluate (const abscissa_type *pX, typename JLANG::JClass< contents_type >::argument_type w)=0
 Histogram filling. More...
 
JHistogramadd (const JHistogram &histogram)
 Add histogram. More...
 
JHistogramsub (const JHistogram &histogram)
 Subtract histogram. More...
 
JHistogrammul (const double value)
 Scale histogram. More...
 
JHistogramdiv (double value)
 Scale histogram. More...
 
const contents_typegetUnderflow () const
 Get contents below lower limit. More...
 
const contents_typegetOverflow () const
 Get contents above upper limit. More...
 
const contents_typegetIntegral () const
 Get contents above upper limit. More...
 

Protected Attributes

contents_type underflow
 
contents_type overflow
 
contents_type integral
 

Friends

JReaderoperator>> (JReader &in, JHistogramMap &object)
 Read histogram map from input. More...
 
JWriteroperator<< (JWriter &out, const JHistogramMap &object)
 Write histogram map to output. More...
 

Detailed Description

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
class JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >

Histogram map.

This class implements the JHistogram interface.

Definition at line 28 of file JHistogramMap.hh.

Member Typedef Documentation

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef JMap_t<JAbscissa_t, JContents_t, JDistance_t> JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::collection_type

Definition at line 34 of file JHistogramMap.hh.

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef JHistogram<JAbscissa_t, typename JContents_t::contents_type> JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::histogram_type

Definition at line 35 of file JHistogramMap.hh.

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef collection_type::abscissa_type JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::abscissa_type

Definition at line 37 of file JHistogramMap.hh.

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef collection_type::ordinate_type JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::ordinate_type

Definition at line 38 of file JHistogramMap.hh.

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef collection_type::value_type JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::value_type

Definition at line 39 of file JHistogramMap.hh.

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef collection_type::const_iterator JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::const_iterator

Definition at line 41 of file JHistogramMap.hh.

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef collection_type::const_reverse_iterator JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::const_reverse_iterator

Definition at line 42 of file JHistogramMap.hh.

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef collection_type::iterator JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::iterator

Definition at line 43 of file JHistogramMap.hh.

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef collection_type::reverse_iterator JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::reverse_iterator

Definition at line 44 of file JHistogramMap.hh.

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
typedef histogram_type::contents_type JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::contents_type

Definition at line 47 of file JHistogramMap.hh.

Constructor & Destructor Documentation

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::JHistogramMap ( )
inline

Default constructor.

Definition at line 53 of file JHistogramMap.hh.

54  {}

Member Function Documentation

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
virtual void JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::evaluate ( const abscissa_type pX,
typename JLANG::JClass< contents_type >::argument_type  w 
)
inlinevirtual

Fill histogram.

Parameters
pXpointer to abscissa values
wweight

Definition at line 63 of file JHistogramMap.hh.

65  {
66  const abscissa_type x = *pX;
67 
68  iterator p = this->lower_bound(x);
69 
70  this->integral += w;
71 
72  if (p == this->begin())
73  this->underflow += w;
74  else if (p == this->end())
75  this->overflow += w;
76  else
77  (--p)->getY().evaluate(++pX, w);
78  }
data_type w[N+1][M+1]
Definition: JPolint.hh:741
collection_type::iterator iterator
collection_type::abscissa_type abscissa_type
template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
JHistogramMap& JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::mul ( typename JLANG::JClass< contents_type >::argument_type  factor)
inline

Scale contents.

Parameters
factormultiplication factor
Returns
this histogram

Definition at line 87 of file JHistogramMap.hh.

88  {
89  collection_type::mul(factor);
90  histogram_type ::mul(factor);
91 
92  return *this;
93  }
JHistogram & mul(const double value)
Scale histogram.
Definition: JHistogram.hh:101
template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
JHistogramMap& JTOOLS::JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t >::div ( typename JLANG::JClass< contents_type >::argument_type  factor)
inline

Scale contents.

Parameters
factordivision factor
Returns
this histogram

Definition at line 102 of file JHistogramMap.hh.

103  {
104  collection_type::div(factor);
105  histogram_type ::div(factor);
106 
107  return *this;
108  }
JHistogram & div(double value)
Scale histogram.
Definition: JHistogram.hh:117
virtual void JTOOLS::JHistogram< JAbscissa_t, JContents_t >::evaluate ( const abscissa_type pX,
typename JLANG::JClass< contents_type >::argument_type  w 
)
pure virtualinherited

Histogram filling.

Parameters
pXpointer to abscissa values
wweight
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::add ( const JHistogram< JAbscissa_t, JContents_t::contents_type > &  histogram)
inlineinherited

Add histogram.

Parameters
histogramhistogram
Returns
this histogram

Definition at line 69 of file JHistogram.hh.

70  {
71  this->underflow += histogram.underflow;
72  this->overflow += histogram.overflow;
73  this->integral += histogram.integral;
74 
75  return *this;
76  }
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::sub ( const JHistogram< JAbscissa_t, JContents_t::contents_type > &  histogram)
inlineinherited

Subtract histogram.

Parameters
histogramhistogram
Returns
this histogram

Definition at line 85 of file JHistogram.hh.

86  {
87  this->underflow -= histogram.underflow;
88  this->overflow -= histogram.overflow;
89  this->integral -= histogram.integral;
90 
91  return *this;
92  }
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::mul ( const double  value)
inlineinherited

Scale histogram.

Parameters
valuemultiplication factor
Returns
this histogram

Definition at line 101 of file JHistogram.hh.

102  {
103  this->underflow *= value;
104  this->overflow *= value;
105  this->integral *= value;
106 
107  return *this;
108  }
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::div ( double  value)
inlineinherited

Scale histogram.

Parameters
valuedivision factor
Returns
this histogram

Definition at line 117 of file JHistogram.hh.

118  {
119  this->underflow /= value;
120  this->overflow /= value;
121  this->integral /= value;
122 
123  return *this;
124  }
const contents_type& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::getUnderflow ( ) const
inlineinherited

Get contents below lower limit.

Returns
contents

Definition at line 132 of file JHistogram.hh.

133  {
134  return underflow;
135  }
const contents_type& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::getOverflow ( ) const
inlineinherited

Get contents above upper limit.

Returns
contents

Definition at line 143 of file JHistogram.hh.

144  {
145  return overflow;
146  }
const contents_type& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::getIntegral ( ) const
inlineinherited

Get contents above upper limit.

Returns
contents

Definition at line 154 of file JHistogram.hh.

155  {
156  return integral;
157  }

Friends And Related Function Documentation

template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
JReader& operator>> ( JReader in,
JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t > &  object 
)
friend

Read histogram map from input.

Parameters
inreader
objecthistogram map
Returns
reader

Definition at line 118 of file JHistogramMap.hh.

119  {
120  in >> static_cast<histogram_type&> (object);
121  in >> static_cast<collection_type&>(object);
122 
123  return in;
124  }
JHistogram< JAbscissa_t, typename JContents_t::contents_type > histogram_type
JMap_t< JAbscissa_t, JContents_t, JDistance_t > collection_type
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:41
template<class JAbscissa_t, class JContents_t, template< class, class, class > class JMap_t, class JDistance_t = JDistance<JAbscissa_t>>
JWriter& operator<< ( JWriter out,
const JHistogramMap< JAbscissa_t, JContents_t, JMap_t, JDistance_t > &  object 
)
friend

Write histogram map to output.

Parameters
outwriter
objecthistogram map
Returns
writer

Definition at line 134 of file JHistogramMap.hh.

135  {
136  out << static_cast<const histogram_type&> (object);
137  out << static_cast<const collection_type&>(object);
138 
139  return out;
140  }

Member Data Documentation

contents_type JTOOLS::JHistogram< JAbscissa_t, JContents_t >::underflow
protectedinherited

Definition at line 195 of file JHistogram.hh.

contents_type JTOOLS::JHistogram< JAbscissa_t, JContents_t >::overflow
protectedinherited

Definition at line 196 of file JHistogram.hh.

contents_type JTOOLS::JHistogram< JAbscissa_t, JContents_t >::integral
protectedinherited

Definition at line 197 of file JHistogram.hh.


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