osl::Histogram Class Reference

ヒストグラム More...

`#include <histogram.h>`

## Public Member Functions

| Histogram (size_t w, size_t len, int start=0, bool show_on_destruct=false)
| ~Histogram ()
size_t | safeIndex (size_t i) const
double & | frequency (size_t i)
double | frequency (size_t i) const
void | add (int value, double weight=1.0)
void | show (std::ostream &os) const
size_t | length () const
size_t | width () const
int | start () const
void | merge (const Histogram &)
| 結果を合算する length や width が異なっていたら何もしない
void | showRatio (std::ostream &os, const Histogram &numerator) const
| \frac{*this}{numerator} を表示 length や width が異なっていたら何もしない

## Private Attributes

boost::scoped_array< double > | data
size_t | length_
size_t | width_
int | start_
bool | show_on_destruct

## Detailed Description

ヒストグラム

Definition at line 15 of file histogram.h.

## Constructor & Destructor Documentation

## Histogram()

osl::stat::Histogram::Histogram | ( | size_t | w,
|  | size_t | len,
|  | int | start = 0,
|  | bool | show_on_destruct = false )

Definition at line 7 of file histogram.cc.

## ~Histogram()

osl::stat::Histogram::~Histogram | ( |  | ) |

Definition at line 14 of file histogram.cc.

## Member Function Documentation

## add()

void osl::stat::Histogram::add | ( | int | value,
|  | double | weight = 1.0 )

inline

Definition at line 29 of file histogram.h.

## frequency() [1/2]

double & osl::stat::Histogram::frequency | ( | size_t | i | ) |

inline

Definition at line 28 of file histogram.h.

## frequency() [2/2]

double osl::stat::Histogram::frequency | ( | size_t | i | ) | const

inline

Definition at line 37 of file histogram.h.

## length()

size_t osl::stat::Histogram::length | ( |  | ) | const

inline

Definition at line 40 of file histogram.h.

## merge()

void osl::stat::Histogram::merge | ( | const Histogram & | o | ) |

結果を合算する length や width が異なっていたら何もしない

Definition at line 20 of file histogram.cc.

## safeIndex()

size_t osl::stat::Histogram::safeIndex | ( | size_t | i | ) | const

inline

Definition at line 24 of file histogram.h.

## show()

void osl::stat::Histogram::show | ( | std::ostream & | os | ) | const

Definition at line 34 of file histogram.cc.

## showRatio()

void osl::stat::Histogram::showRatio | ( | std::ostream & | os,
|  | const Histogram & | numerator ) const

\frac{*this}{numerator} を表示 length や width が異なっていたら何もしない

Definition at line 46 of file histogram.cc.

## start()

int osl::stat::Histogram::start | ( |  | ) | const

inline

Definition at line 42 of file histogram.h.

## width()

size_t osl::stat::Histogram::width | ( |  | ) | const

inline

Definition at line 41 of file histogram.h.

## Member Data Documentation

## data

boost::scoped_array<double> osl::stat::Histogram::data

private

Definition at line 17 of file histogram.h.

## length_

size_t osl::stat::Histogram::length_

private

Definition at line 18 of file histogram.h.

## show_on_destruct

bool osl::stat::Histogram::show_on_destruct

private

Definition at line 20 of file histogram.h.

## start_

int osl::stat::Histogram::start_

private

Definition at line 19 of file histogram.h.

## width_

size_t osl::stat::Histogram::width_

private

Definition at line 18 of file histogram.h.

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

- histogram.h
- histogram.cc