![]() |
UNIVERS
15.3
UNIVERS base processing software API
|
#include <ZHistogram.H>
Public Types | |
| enum | ZHistMode { Absolute, Signed } |
Public Member Functions | |
| ZHistogram (ZHistMode hm, unsigned nRanges=100) | |
| ZHistogram (const ZHistogram &zh) | |
| ZHistogram & | operator= (const ZHistogram &zh) |
| void | reset () |
| void | reset (ZHistMode hm) |
| void | add_vector (const float *items, unsigned n_items) |
| void | get_range (float mm[2]) const |
| Logic | get_range (int index, float r[2]) const |
| float | get_hits (float c[2]) const |
| float | get_hits (int index) const |
| float | operator() (int index) const |
| int | get_index (float c) const |
| ZHistogram & | unify (const ZHistogram &zh) |
| ZHistogram & | operator+= (const ZHistogram &zh) |
| unsigned | curve_data (float *&arg, float *&val, float max=0.0) const |
| float | limit_hits_coord (float part) const |
Class for histogram with equal distribution step creation and maintenance.
| ZHistogram::ZHistogram | ( | ZHistMode | hm, |
| unsigned | nRanges = 100 |
||
| ) |
Create object for given number of ranges. The more is the number the more is precision
| ZHistogram::ZHistogram | ( | const ZHistogram & | zh | ) |
Create exact copy of the object
| void ZHistogram::add_vector | ( | const float * | items, |
| unsigned | n_items | ||
| ) |
Add vector of samples
| unsigned ZHistogram::curve_data | ( | float *& | arg, |
| float *& | val, | ||
| float | max = 0.0 |
||
| ) | const |
Extract computed histogram - number of node points is returned. Resulted arg and val pointers are dynamically allocated and must be released by free(). Normalization to given maximum is performed in maximum is not zero.
| float ZHistogram::get_hits | ( | float | c[2] | ) | const |
Get number of hits in given range of coordinate
| float ZHistogram::get_hits | ( | int | index | ) | const |
Get number of hits in the ranges by given index. Out of range index returns 0.0
| int ZHistogram::get_index | ( | float | c | ) | const |
Get index of the range containing given coordinate
| void ZHistogram::get_range | ( | float | mm[2] | ) | const |
Get the whole histogram range
| Logic ZHistogram::get_range | ( | int | index, |
| float | r[2] | ||
| ) | const |
Get pair of coordinates for the cell with given index and return TRUE. For out of range index return FALSE
| float ZHistogram::limit_hits_coord | ( | float | part | ) | const |
Return coordinate value which limits hits from 0 to it or from minus it to plus it (depending of mode) by given part (0.0 to 1.0)
| ZHistogram& ZHistogram::operator= | ( | const ZHistogram & | zh | ) |
Assign one histogram to another by replacing previous contents of this one
| void ZHistogram::reset | ( | ) |
Clean the histogram and prepare to build new one
| void ZHistogram::reset | ( | ZHistMode | hm | ) |
Clean the histogram in new mode and prepare to build new one
| ZHistogram& ZHistogram::unify | ( | const ZHistogram & | zh | ) |
Unify this histogram with given. Dimension of hits array will be rest the same, but bounds mm[] and step may be changed.
1.8.5