Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
CommonTools
Statistics
interface
Accumulator.h
Go to the documentation of this file.
1
#ifndef Statistics_Accumulator_h
2
#define Statistics_Accumulator_h
3
9
#include <iosfwd>
10
#include <cmath>
11
12
class
Accumulator
{
13
public
:
14
Accumulator
();
15
16
void
addEntry
(
double
value
,
double
weight
= 1.);
17
18
double
mean
()
const
;
19
20
double
variance
()
const
;
21
22
double
sigma
()
const
{
return
std::sqrt
(
variance
()); }
23
24
double
weightedMean
()
const
;
25
26
unsigned
long
nEntries
()
const
{
return
n_
; }
27
28
private
:
29
double
sum_
;
30
double
sumOfSquares_
;
31
double
weightedSum_
;
32
double
sumOfWeights_
;
33
unsigned
long
n_
;
34
};
35
36
std::ostream&
operator<<
(std::ostream& os,
const
Accumulator
&
stat
);
37
38
#endif
Accumulator::Accumulator
Accumulator()
Definition:
Accumulator.cc:4
Accumulator::addEntry
void addEntry(double value, double weight=1.)
Definition:
Accumulator.cc:6
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:55
Accumulator::mean
double mean() const
Definition:
Accumulator.cc:14
Accumulator::weightedSum_
double weightedSum_
Definition:
Accumulator.h:31
operator<<
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition:
ALILine.cc:167
Accumulator::n_
unsigned long n_
Definition:
Accumulator.h:33
Accumulator
Definition:
Accumulator.h:12
Accumulator::nEntries
unsigned long nEntries() const
Definition:
Accumulator.h:26
Accumulator::sigma
double sigma() const
Definition:
Accumulator.h:22
Accumulator::sum_
double sum_
Definition:
Accumulator.h:29
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
Accumulator::weightedMean
double weightedMean() const
Definition:
Accumulator.cc:22
edm_modernize_messagelogger.stat
stat
Definition:
edm_modernize_messagelogger.py:27
Accumulator::variance
double variance() const
Definition:
Accumulator.cc:16
histoStyle.weight
int weight
Definition:
histoStyle.py:51
Accumulator::sumOfSquares_
double sumOfSquares_
Definition:
Accumulator.h:30
Accumulator::sumOfWeights_
double sumOfWeights_
Definition:
Accumulator.h:32
Generated for CMSSW Reference Manual by
1.8.5