#include <histogram.hh>
Inheritance diagram for oln::utils::histogram_minmax< T, CPT, V2P, Exact >:
Public Types | |
typedef mlc::exact_vt< histogram_minmax< T, CPT, V2P, Exact >, Exact >::ret | exact_type |
typedef hist_traits< exact_type >::value_type | value_type |
typedef hist_traits< exact_type >::cpt_type | cpt_type |
typedef hist_traits< exact_type >::value_to_point_type | value_to_point_type |
typedef hist_traits< exact_type >::point_type | point_type |
typedef hist_traits< exact_type >::img_type | img_type |
typedef histogram< T, CPT, V2P, exact_type > | upper_type |
enum | { dim = hist_traits<exact_type>::dim } |
Public Member Functions | |
histogram_minmax (const value_to_point_type &v2p=value_to_point_type()) | |
template<class I> | histogram_minmax (const oln::abstract::image< I > &input, const value_to_point_type &v2p=value_to_point_type()) |
const cpt_type | at (const value_type &i) const |
operator[] should be called. | |
cpt_type & | at (const value_type &i) |
operator[] should be called. | |
value_type | min () |
Quick function min. | |
value_type | max () |
Quick function max. | |
Protected Member Functions | |
void | adjust (const value_type &idx) |
Maintain the worst min and max. | |
Protected Attributes | |
value_type | min_ |
value_type | max_ |
Indices of min and max elements. |
The idea behind the min- and max-specialized histogram is to maintain worst min and max bounds while updating histogram. It does not maintain _exact_ min and max bounds, because this would involve some costly computation when removing values from the histogram and maybe this time will be lost if the removed value is reinserted before max() or min() is called.
So it updates the _worst_ min and max bounds whenever the histogram value are accessed, and delay the _real_ min and max computation until min() or max() is called.
Definition at line 376 of file histogram.hh.