Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
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
{
14
public
:
15
Accumulator
();
16
17
void
addEntry
(
double
value
,
double
weight
=1.);
18
19
double
mean
()
const
;
20
21
double
variance
()
const
;
22
23
double
sigma
()
const
{
return
std::sqrt
(
variance
());}
24
25
double
weightedMean
()
const
;
26
27
unsigned
long
nEntries
()
const
{
return
n_
;}
28
29
private
:
30
double
sum_
;
31
double
sumOfSquares_
;
32
double
weightedSum_
;
33
double
sumOfWeights_
;
34
unsigned
long
n_
;
35
};
36
37
std::ostream &
operator<<
(std::ostream & os,
const
Accumulator
& stat);
38
39
#endif
40
Accumulator::Accumulator
Accumulator()
Definition:
Accumulator.cc:4
Accumulator::addEntry
void addEntry(double value, double weight=1.)
Definition:
Accumulator.cc:14
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
Accumulator::mean
double mean() const
Definition:
Accumulator.cc:23
Accumulator::weightedSum_
double weightedSum_
Definition:
Accumulator.h:32
operator<<
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition:
ALILine.cc:188
Accumulator::n_
unsigned long n_
Definition:
Accumulator.h:34
Accumulator
Definition:
Accumulator.h:12
Accumulator::nEntries
unsigned long nEntries() const
Definition:
Accumulator.h:27
Accumulator::sigma
double sigma() const
Definition:
Accumulator.h:23
Accumulator::sum_
double sum_
Definition:
Accumulator.h:30
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:18
Accumulator::weightedMean
double weightedMean() const
Definition:
Accumulator.cc:35
Accumulator::variance
double variance() const
Definition:
Accumulator.cc:28
histoStyle.weight
int weight
Definition:
histoStyle.py:50
Accumulator::sumOfSquares_
double sumOfSquares_
Definition:
Accumulator.h:31
Accumulator::sumOfWeights_
double sumOfWeights_
Definition:
Accumulator.h:33
Generated for CMSSW Reference Manual by
1.8.5