cgv
Loading...
Searching...
No Matches
statistics.h
1
#pragma once
2
3
#include <iostream>
4
#include <cmath>
5
6
#include "lib_begin.h"
7
8
namespace
cgv
{
9
namespace
utils {
10
12
class
CGV_API
statistics
13
{
14
public
:
16
statistics
();
18
statistics
(
const
double
& v);
20
statistics
(
const
double
& v,
unsigned
int
n);
22
void
init();
24
void
init(
const
double
& v);
26
void
init(
const
double
& v,
unsigned
int
n);
28
void
update(
const
double
& v);
30
void
update(
const
double
& v,
unsigned
int
n);
32
double
get_average()
const
;
34
double
get_variance()
const
;
36
double
get_standard_deviation()
const
;
38
double
get_sum()
const
;
40
double
get_sum_of_squares()
const
;
42
double
get_min()
const
;
44
double
get_max()
const
;
46
unsigned
int
get_count()
const
;
47
protected
:
48
double
min, max, sum, sms;
49
unsigned
int
cnt;
50
};
51
52
53
extern
CGV_API std::ostream& operator << (std::ostream& os,
const
statistics
& s);
54
55
}
56
}
57
58
#include <cgv/config/lib_end.h>
cgv::utils::statistics
incrementally accumulate statistical information
Definition
statistics.h:13
cgv
the cgv namespace
Definition
print.h:11
cgv
utils
statistics.h
Generated by
1.9.8