Functions

mln::set::impl::generic Namespace Reference

Functions

template<typename S >
unsigned card (const Site_Set< S > &s_)
template<typename A , typename S >
A::result compute (const Accumulator< A > &a_, const Site_Set< S > &s_)
template<typename A , typename I >
A::result compute_with_weights (const Accumulator< A > &a_, const Image< I > &w_)
 Generic implementation that Computes an accumulator on a site set described by an image.
template<typename A , typename I , typename L >
util::array< typename A::result > compute_with_weights (const Accumulator< A > &a_, const Image< I > &w_, const Image< L > &label_, const typename L::value &nlabels)
 Generic implementation that computes an accumulator on every labeled sub-site-sets.

Function Documentation

template<typename S >
unsigned mln::set::impl::generic::card ( const Site_Set< S > &  s_  ) 

Definition at line 61 of file set/card.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::set::s.

template<typename A , typename S >
A ::result mln::set::impl::generic::compute ( const Accumulator< A > &  a_,
const Site_Set< S > &  s_ 
) [inline]

Definition at line 82 of file set/compute.hh.

References mln::trace::entering(), mln::exact(), and mln::trace::exiting().

Referenced by mln::set::compute().

template<typename A , typename I >
A ::result mln::set::impl::generic::compute_with_weights ( const Accumulator< A > &  a_,
const Image< I > &  w_ 
) [inline]

Generic implementation that Computes an accumulator on a site set described by an image.

Parameters:
[in] a_ An accumulator.
[in] w_ An image of weights (a site -> a weight).
Returns:
The accumulator result.

Definition at line 142 of file compute_with_weights.hh.

References mln::trace::entering(), mln::exact(), mln::trace::exiting(), and mln::set::w.

Referenced by mln::set::compute_with_weights().

template<typename A , typename I , typename L >
util::array<typename A ::result> mln::set::impl::generic::compute_with_weights ( const Accumulator< A > &  a_,
const Image< I > &  w_,
const Image< L > &  label_,
const typename L::value &  nlabels 
)

Generic implementation that computes an accumulator on every labeled sub-site-sets.

Parameters:
[in] a_ An accumulator.
[in] w_ An image of weights (a site -> a weight).
[in] label_ A label image.
[in] nlabels The number of labels in label.
Returns:
An array of accumulator result. One per label.

Definition at line 175 of file compute_with_weights.hh.

References mln::set::internal::compute_with_weights_tests(), mln::trace::entering(), mln::exact(), mln::trace::exiting(), mln::convert::from_to(), mln::value::next(), and mln::set::w.