AFF --- A container for numbers (array) by Friederich and Forbriger.

◆ collect()

template<class C , template< class > class F>
F<C>::Tretval aff::func::util::collect ( const typename C::Tcoc &  c)

Function template to extract information from container data

This is a framework to browse through a container and extract information like the average or the minimum value. This function template is used by container functions like aff::func::avg().

Parameters
Cany container class like aff::Array<double>
F<T>any collector utility class like aff::func::util::Extractavg
Returns
result of operation that is coded in F<T>
See also
aff::func::avg(), aff::func::min(), aff::func::max(), aff::func::rms()

Definition at line 71 of file collector.h.

References aff::Browser< C >::valid().

72  {
73  F<C> exfun(c);
74  aff::Browser<C> browser(c);
75  while(browser.valid())
76  {
77  exfun(*browser);
78  ++browser;
79  }
80  return(exfun.result());
81  }; // collect
Browser.
Definition: iterator.h:139
Here is the call graph for this function: