ug4
ug::raster_kernels::Count< T, TDIM > Class Template Reference

Kernel which counts the number of times it was run on valid data values. More...

#include <raster_kernels.h>

Public Types

typedef size_t result_t
 

Public Member Functions

 Count ()
 
void operator() (Raster< T, TDIM > &raster, const typename Raster< T, TDIM >::MultiIndex &cur)
 
size_t result () const
 

Private Attributes

size_t m_count
 

Detailed Description

template<class T, int TDIM>
class ug::raster_kernels::Count< T, TDIM >

Kernel which counts the number of times it was run on valid data values.

For use with ug::Raster.

This class defines a default constructor, the type 'result_t', and the method 'result_t result() const' and can thus be used like this:

Raster<T,TDIM> raster;
//...
size_t countAll = raster.run_on_all<Count<T,TDIM> > ();
size_t countNbrs = raster.run_on_nbrs<Count<T,TDIM> > (someMultiIndex);
Note
if the kernel is run on a 'no_data_value', the counter is not increased.

Member Typedef Documentation

◆ result_t

template<class T , int TDIM>
typedef size_t ug::raster_kernels::Count< T, TDIM >::result_t

Constructor & Destructor Documentation

◆ Count()

template<class T , int TDIM>
ug::raster_kernels::Count< T, TDIM >::Count ( )
inline

Member Function Documentation

◆ operator()()

template<class T , int TDIM>
void ug::raster_kernels::Count< T, TDIM >::operator() ( Raster< T, TDIM > &  raster,
const typename Raster< T, TDIM >::MultiIndex cur 
)
inline

◆ result()

template<class T , int TDIM>
size_t ug::raster_kernels::Count< T, TDIM >::result ( ) const
inline

Member Data Documentation

◆ m_count

template<class T , int TDIM>
size_t ug::raster_kernels::Count< T, TDIM >::m_count
private

The documentation for this class was generated from the following file: