Jpp  18.2.1-ARCA-DF-PATCH
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 | Friends | List of all members
JTOOLS::JHistogram< JAbscissa_t, JContents_t > Class Template Referenceabstract

Template definition of histogram object interface. More...

#include <JHistogram.hh>

Inheritance diagram for JTOOLS::JHistogram< JAbscissa_t, JContents_t >:
JTOOLS::JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t >

Public Types

typedef JAbscissa_t abscissa_type
 
typedef JContents_t contents_type
 

Public Member Functions

virtual ~JHistogram ()
 Virtual destructor. More...
 
void reset ()
 Reset. 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 Member Functions

 JHistogram ()
 Default constructor. More...
 

Protected Attributes

contents_type underflow
 
contents_type overflow
 
contents_type integral
 

Friends

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

Detailed Description

template<class JAbscissa_t, class JContents_t>
class JTOOLS::JHistogram< JAbscissa_t, JContents_t >

Template definition of histogram object interface.

This class also comprises auxiliary data.

Definition at line 27 of file JHistogram.hh.

Member Typedef Documentation

template<class JAbscissa_t, class JContents_t>
typedef JAbscissa_t JTOOLS::JHistogram< JAbscissa_t, JContents_t >::abscissa_type

Definition at line 42 of file JHistogram.hh.

template<class JAbscissa_t, class JContents_t>
typedef JContents_t JTOOLS::JHistogram< JAbscissa_t, JContents_t >::contents_type

Definition at line 43 of file JHistogram.hh.

Constructor & Destructor Documentation

template<class JAbscissa_t, class JContents_t>
JTOOLS::JHistogram< JAbscissa_t, JContents_t >::JHistogram ( )
inlineprotected

Default constructor.

Definition at line 33 of file JHistogram.hh.

33  :
37  {}
contents_type underflow
Definition: JHistogram.hh:206
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
contents_type integral
Definition: JHistogram.hh:208
contents_type overflow
Definition: JHistogram.hh:207
template<class JAbscissa_t, class JContents_t>
virtual JTOOLS::JHistogram< JAbscissa_t, JContents_t >::~JHistogram ( )
inlinevirtual

Virtual destructor.

Definition at line 49 of file JHistogram.hh.

50  {}

Member Function Documentation

template<class JAbscissa_t, class JContents_t>
void JTOOLS::JHistogram< JAbscissa_t, JContents_t >::reset ( )
inline

Reset.

Definition at line 56 of file JHistogram.hh.

57  {
58  this->underflow = JMATH::zero;
59  this->overflow = JMATH::zero;
60  this->integral = JMATH::zero;
61  }
contents_type underflow
Definition: JHistogram.hh:206
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
contents_type integral
Definition: JHistogram.hh:208
contents_type overflow
Definition: JHistogram.hh:207
template<class JAbscissa_t, class JContents_t>
virtual void JTOOLS::JHistogram< JAbscissa_t, JContents_t >::evaluate ( const abscissa_type pX,
typename JLANG::JClass< contents_type >::argument_type  w 
)
pure virtual

Histogram filling.

Parameters
pXpointer to abscissa values
wweight

Implemented in JTOOLS::JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t >.

template<class JAbscissa_t, class JContents_t>
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::add ( const JHistogram< JAbscissa_t, JContents_t > &  histogram)
inline

Add histogram.

Parameters
histogramhistogram
Returns
this histogram

Definition at line 80 of file JHistogram.hh.

81  {
82  this->underflow += histogram.underflow;
83  this->overflow += histogram.overflow;
84  this->integral += histogram.integral;
85 
86  return *this;
87  }
contents_type underflow
Definition: JHistogram.hh:206
contents_type integral
Definition: JHistogram.hh:208
contents_type overflow
Definition: JHistogram.hh:207
template<class JAbscissa_t, class JContents_t>
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::sub ( const JHistogram< JAbscissa_t, JContents_t > &  histogram)
inline

Subtract histogram.

Parameters
histogramhistogram
Returns
this histogram

Definition at line 96 of file JHistogram.hh.

97  {
98  this->underflow -= histogram.underflow;
99  this->overflow -= histogram.overflow;
100  this->integral -= histogram.integral;
101 
102  return *this;
103  }
contents_type underflow
Definition: JHistogram.hh:206
contents_type integral
Definition: JHistogram.hh:208
contents_type overflow
Definition: JHistogram.hh:207
template<class JAbscissa_t, class JContents_t>
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::mul ( const double  value)
inline

Scale histogram.

Parameters
valuemultiplication factor
Returns
this histogram

Definition at line 112 of file JHistogram.hh.

113  {
114  this->underflow *= value;
115  this->overflow *= value;
116  this->integral *= value;
117 
118  return *this;
119  }
contents_type underflow
Definition: JHistogram.hh:206
contents_type integral
Definition: JHistogram.hh:208
contents_type overflow
Definition: JHistogram.hh:207
template<class JAbscissa_t, class JContents_t>
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::div ( double  value)
inline

Scale histogram.

Parameters
valuedivision factor
Returns
this histogram

Definition at line 128 of file JHistogram.hh.

129  {
130  this->underflow /= value;
131  this->overflow /= value;
132  this->integral /= value;
133 
134  return *this;
135  }
contents_type underflow
Definition: JHistogram.hh:206
contents_type integral
Definition: JHistogram.hh:208
contents_type overflow
Definition: JHistogram.hh:207
template<class JAbscissa_t, class JContents_t>
const contents_type& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::getUnderflow ( ) const
inline

Get contents below lower limit.

Returns
contents

Definition at line 143 of file JHistogram.hh.

144  {
145  return underflow;
146  }
contents_type underflow
Definition: JHistogram.hh:206
template<class JAbscissa_t, class JContents_t>
const contents_type& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::getOverflow ( ) const
inline

Get contents above upper limit.

Returns
contents

Definition at line 154 of file JHistogram.hh.

155  {
156  return overflow;
157  }
contents_type overflow
Definition: JHistogram.hh:207
template<class JAbscissa_t, class JContents_t>
const contents_type& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::getIntegral ( ) const
inline

Get contents above upper limit.

Returns
contents

Definition at line 165 of file JHistogram.hh.

166  {
167  return integral;
168  }
contents_type integral
Definition: JHistogram.hh:208

Friends And Related Function Documentation

template<class JAbscissa_t, class JContents_t>
JReader& operator>> ( JReader in,
JHistogram< JAbscissa_t, JContents_t > &  object 
)
friend

Read histogram from input.

Parameters
inreader
objecthistogram
Returns
reader

Definition at line 178 of file JHistogram.hh.

179  {
180  in >> object.underflow;
181  in >> object.overflow;
182  in >> object.integral;
183 
184  return in;
185  }
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
template<class JAbscissa_t, class JContents_t>
JWriter& operator<< ( JWriter out,
const JHistogram< JAbscissa_t, JContents_t > &  object 
)
friend

Write histogram to output.

Parameters
outwriter
objecthistogram
Returns
writer

Definition at line 195 of file JHistogram.hh.

196  {
197  out << object.underflow;
198  out << object.overflow;
199  out << object.integral;
200 
201  return out;
202  }

Member Data Documentation

template<class JAbscissa_t, class JContents_t>
contents_type JTOOLS::JHistogram< JAbscissa_t, JContents_t >::underflow
protected

Definition at line 206 of file JHistogram.hh.

template<class JAbscissa_t, class JContents_t>
contents_type JTOOLS::JHistogram< JAbscissa_t, JContents_t >::overflow
protected

Definition at line 207 of file JHistogram.hh.

template<class JAbscissa_t, class JContents_t>
contents_type JTOOLS::JHistogram< JAbscissa_t, JContents_t >::integral
protected

Definition at line 208 of file JHistogram.hh.


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