oln::utils::histogram_minmax< T, CPT, V2P, Exact > Class Template Reference

#include <histogram.hh>

Inheritance diagram for oln::utils::histogram_minmax< T, CPT, V2P, Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::utils::histogram_minmax< T, CPT, V2P, Exact >:

Collaboration graph
[legend]
List of all members.

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.


Detailed Description

template<typename T, typename CPT, class V2P, class Exact>
class oln::utils::histogram_minmax< T, CPT, V2P, Exact >

Build the histogram and has quick min and max functions.

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.

See also:
histogram

histogram_min

histogram_max

Definition at line 376 of file histogram.hh.


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 20:17:23 2004 for Olena by doxygen 1.3.6-20040222