35#ifndef AIMS_HISTOGRAM_CUMULATED_H
36#define AIMS_HISTOGRAM_CUMULATED_H
71template<
class T >
inline
82template<
class T >
inline
86 carto::AllocatorContext::fast() );
92 res( 0 ) = thing.
data()( 0 );
95 int32_t * out = &*res.
begin() + 1;
98 *out = *in + *( out - 1 );
104template<
class T >
inline
108 int realValue = (int) ( this->
_nPoints * percent / 100. );
111 while ( *it < realValue && it != this->
_data.end() )
CumulatedHistogram()
Constructors and destructor.
int valueForPercentage(float)
return the bin value for a given percentage
CumulatedHistogram(const CumulatedHistogram< T > &other)
copy constructor
void doit(const carto::rc_ptr< carto::Volume< T > > &thing)
computation from a Volume
virtual ~CumulatedHistogram()
destructor
carto::VolumeRef< int32_t > & data()
return a reference to the data field of the histogram class.
int minValid() const
return the minimum valid (used) value of the histogram
carto::VolumeRef< int32_t > _data
histogram datas
int _minValid
minimum used value
int _nPoints
total number of points
int _maxValid
maximum used value
int totalPoints() const
return the total number of points in the histogram
int maxValid() const
returnn the maximum valid (used) value of the histogram
Classical histogram container class.
void doit(const carto::rc_ptr< carto::Volume< T > > &thing)
classical histogram computation function.