35#ifndef AIMS_HISTOGRAM_HISTOGRAM_H
36#define AIMS_HISTOGRAM_HISTOGRAM_H
38#include <cartodata/volume/volume.h>
75 {
return &*
_data.begin(); }
82 {
return &*
_data.begin(); }
103 friend std::ostream& operator << <> ( std::ostream& os,
121template<
class T >
inline
128template<
class T >
inline
137template <
class T >
inline
140 os <<
"{nPoints=" << thing.
_nPoints <<
",";
141 os <<
"minValid=" << thing.
_minValid <<
",";
142 os <<
"maxValid=" << thing.
_maxValid <<
",";
143 os <<
"data=" << thing.
_data <<
"}";
Base class of histogram container class.
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
const carto::VolumeRef< int32_t > & data() const
return a constant reference to the data field of the histogram class.
int32_t * endValid()
return the iterator to the last valid value of the histogram
virtual ~Histogram()
destructor.
int _nPoints
total number of points
int32_t * beginValid()
return the iterator to the first valid value of the histogram
int _maxValid
maximum used value
virtual void doit(const carto::rc_ptr< carto::Volume< T > > &)
the histogram computation function.
int totalPoints() const
return the total number of points in the histogram
int maxValid() const
returnn the maximum valid (used) value of the histogram
const int32_t * beginValid() const
return the constant iterator to the first valid value of the histogram
const int32_t * endValid() const
return the constant iterator to the last valid value of the histogram
std::ostream & operator<<(std::ostream &os, const Histogram< T > &thing)
Volume< T > deepcopy(const Volume< T > &src, const std::vector< int > &size=std::vector< int >())