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

Kernel which sums the values for all entries it was called on. More...

#include <raster_kernels.h>

Public Types

typedef T result_t
 

Public Member Functions

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

Private Attributes

m_sum
 

Detailed Description

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

Kernel which sums the values for all entries it was called on.

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 sumAll = raster.run_on_all<Sum<T,TDIM> > ();
size_t sumNbrs = raster.run_on_nbrs<Sum<T,TDIM> > (someMultiIndex);
Note
'no_data_values' are ignored and will not be summed.

Member Typedef Documentation

◆ result_t

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

Constructor & Destructor Documentation

◆ Sum()

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

Member Function Documentation

◆ operator()()

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

◆ result()

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

Member Data Documentation

◆ m_sum

template<class T , int TDIM>
T ug::raster_kernels::Sum< T, TDIM >::m_sum
private

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