QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <histogram.hpp>
Public Types | |
enum | Algorithm { None , Sturges , FD , Scott } |
Public Member Functions | |
constructors | |
Histogram () | |
template<class T > | |
Histogram (T data_begin, T data_end, Size breaks) | |
template<class T > | |
Histogram (T data_begin, T data_end, Algorithm algorithm) | |
template<class T , class U > | |
Histogram (T data_begin, T data_end, U breaks_begin, U breaks_end) | |
inspectors | |
Size | bins () const |
const std::vector< Real > & | breaks () const |
Algorithm | algorithm () const |
bool | empty () const |
results | |
std::vector< Real > | data_ |
Size | bins_ = 0 |
Algorithm | algorithm_ = None |
std::vector< Real > | breaks_ |
std::vector< Size > | counts_ |
std::vector< Real > | frequency_ |
Size | counts (Size i) const |
Real | frequency (Size i) const |
void | calculate () |
Histogram class.
This class computes the histogram of a given data set. The caller can specify the number of bins, the breaks, or the algorithm for determining these quantities in computing the histogram.
Definition at line 38 of file histogram.hpp.
enum Algorithm |
Enumerator | |
---|---|
None | |
Sturges | |
FD | |
Scott |
Definition at line 40 of file histogram.hpp.
Histogram | ( | ) |
Definition at line 44 of file histogram.hpp.
Size bins | ( | ) | const |
const std::vector< Real > & breaks | ( | ) | const |
Histogram::Algorithm algorithm | ( | ) | const |
Definition at line 75 of file histogram.cpp.
bool empty | ( | ) | const |
Definition at line 79 of file histogram.cpp.
Definition at line 83 of file histogram.cpp.
|
private |
Definition at line 99 of file histogram.cpp.
|
private |
Definition at line 81 of file histogram.hpp.
|
private |
Definition at line 82 of file histogram.hpp.
Definition at line 83 of file histogram.hpp.
|
private |
Definition at line 84 of file histogram.hpp.
|
private |
Definition at line 85 of file histogram.hpp.
|
private |
Definition at line 86 of file histogram.hpp.