A.I.M.S


aims::MathUtil< T > Class Template Reference

Defines basic math functions that run on iterators. More...

#include <aims/math/mathelem.h>

Static Public Member Functions

template<typename Iterator >
static T max (Iterator b, Iterator e, T default_value=std::numeric_limits< T >::min())
 
template<typename Iterator >
static T min (Iterator b, Iterator e, T default_value=std::numeric_limits< T >::max())
 
template<typename Iterator >
static T median (Iterator b, Iterator e, T default_value=(T) 0)
 
template<typename Iterator >
static T notnull_median (Iterator b, Iterator e, T default_value=(T) 0)
 
template<typename Iterator >
static T mean (Iterator b, Iterator e)
 
template<typename Iterator >
static T notnull_mean (Iterator b, Iterator e)
 
template<typename Iterator >
static T majority (Iterator b, Iterator e, T default_value=(T) 0)
 
template<typename Iterator >
static T extrema_difference (Iterator b, Iterator e)
 
template<typename Iterator >
static T sum (Iterator b, Iterator e)
 
template<typename Iterator >
static T variance (Iterator b, Iterator e)
 
template<typename Iterator >
static T stdev (Iterator b, Iterator e)
 

Detailed Description

template<typename T>
class aims::MathUtil< T >

Defines basic math functions that run on iterators.

They can be used with any iterators pointing to numeric values

#include <aims/math/matheleme.h>
using namespace aims;
using namespace carto;
int main()
{
int16_t med = MathUtil<int16_t>::median( image.begin(), image.end() );
}

Definition at line 116 of file mathelem.h.

Member Function Documentation

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::extrema_difference ( Iterator  b,
Iterator  e 
)
inlinestatic

Definition at line 237 of file mathelem.h.

References aims::MathUtil< T >::max(), and aims::MathUtil< T >::min().

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::majority ( Iterator  b,
Iterator  e,
default_value = (T)0 
)
inlinestatic

Definition at line 202 of file mathelem.h.

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::max ( Iterator  b,
Iterator  e,
default_value = std::numeric_limits<T>::min() 
)
inlinestatic

Definition at line 120 of file mathelem.h.

Referenced by aims::MathUtil< T >::extrema_difference().

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::mean ( Iterator  b,
Iterator  e 
)
inlinestatic

Definition at line 171 of file mathelem.h.

References aims::MathUtil< T >::sum().

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::median ( Iterator  b,
Iterator  e,
default_value = (T)0 
)
inlinestatic

Definition at line 142 of file mathelem.h.

Referenced by aims::BorderFiller< T >::fillMedian().

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::min ( Iterator  b,
Iterator  e,
default_value = std::numeric_limits<T>::max() 
)
inlinestatic

Definition at line 131 of file mathelem.h.

Referenced by aims::MathUtil< T >::extrema_difference().

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::notnull_mean ( Iterator  b,
Iterator  e 
)
inlinestatic

Definition at line 186 of file mathelem.h.

References aims::MathUtil< T >::sum().

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::notnull_median ( Iterator  b,
Iterator  e,
default_value = (T)0 
)
inlinestatic

Definition at line 156 of file mathelem.h.

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::stdev ( Iterator  b,
Iterator  e 
)
inlinestatic

Definition at line 278 of file mathelem.h.

References accumulate().

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::sum ( Iterator  b,
Iterator  e 
)
inlinestatic

Definition at line 246 of file mathelem.h.

References accumulate().

Referenced by aims::MathUtil< T >::mean(), and aims::MathUtil< T >::notnull_mean().

template<typename T>
template<typename Iterator >
static T aims::MathUtil< T >::variance ( Iterator  b,
Iterator  e 
)
inlinestatic

Definition at line 258 of file mathelem.h.

References accumulate().


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