Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros
measure.h File Reference
`#include <math.h>`

Go to the source code of this file.

## Classes

struct | MEASUREMENT

## Macros

#define | ADD_SAMPLE(m, s)
#define | MEAN(m)
#define | new_measurement(m)
#define | number_of_samples(m) ((m).num_samples)
#define | standard_deviation(m) ((float) sqrt (VARIANCE (m)))
#define | VARIANCE(m)
#define | print_summary(string, measure)

## Macro Definition Documentation

#define ADD_SAMPLE | ( |  | m,
|  |  | s
| ) |  |

Value:
(m.sum_of_samples += (float) (s), \
m.sum_of_squares += (float) (s) * (float) (s), \
++m.num_samples)

Definition at line 63 of file measure.h.

#define MEAN | ( |  | m | ) |

Value:
((m).num_samples ? \
((float) ((m).sum_of_samples / (m).num_samples)) : \
0)

Definition at line 74 of file measure.h.

#define new_measurement | ( |  | m | ) |

Value:
((m).num_samples = 0, \
(m).sum_of_samples = 0, \
(m).sum_of_squares = 0)

Definition at line 86 of file measure.h.

#define number_of_samples | ( |  | m | ) | ((m).num_samples)

Definition at line 97 of file measure.h.

#define print_summary | ( |  | string,
|  |  | measure
| ) |  |

Value:
cprintf ("\t%-20s \tn = %d, \tm = %4.2f, \ts = %4.2f\n ", \
string, \
number_of_samples (measure), \
MEAN (measure), \
standard_deviation (measure))

Definition at line 129 of file measure.h.

#define standard_deviation | ( |  | m | ) | ((float) sqrt (VARIANCE (m)))

Definition at line 106 of file measure.h.

#define VARIANCE | ( |  | m | ) |

Value:
(((m).num_samples > 1) ? \
((float) \
(((m).num_samples * (m).sum_of_squares - \
(m).sum_of_samples * (m).sum_of_samples) / \
(((m).num_samples - 1) * (m).num_samples))) : \
0)

Definition at line 115 of file measure.h.