33 #include <agrum/tools/multidim/aggregators/amplitude.h> 34 #include <agrum/tools/multidim/aggregators/multiDimAggregator.h> 38 namespace aggregator {
39 template <
typename GUM_SCALAR >
40 INLINE Amplitude< GUM_SCALAR >::Amplitude() :
41 MultiDimAggregator< GUM_SCALAR >() {
42 GUM_CONSTRUCTOR(Amplitude);
45 template <
typename GUM_SCALAR >
47 Amplitude< GUM_SCALAR >::Amplitude(
const Amplitude< GUM_SCALAR >& from) :
48 MultiDimAggregator< GUM_SCALAR >(from) {
49 GUM_CONS_CPY(Amplitude);
52 template <
typename GUM_SCALAR >
53 INLINE Amplitude< GUM_SCALAR >::~Amplitude() {
54 GUM_DESTRUCTOR(Amplitude);
57 template <
typename GUM_SCALAR >
58 INLINE std::string Amplitude< GUM_SCALAR >::aggregatorName()
const {
64 template <
typename GUM_SCALAR >
65 INLINE MultiDimContainer< GUM_SCALAR >*
66 Amplitude< GUM_SCALAR >::newFactory()
const {
67 return new Amplitude< GUM_SCALAR >();
70 template <
typename GUM_SCALAR >
71 Idx Amplitude< GUM_SCALAR >::buildValue_(
const gum::Instantiation& i)
const {
73 if (i.nbrDim() < 2)
return 0;
78 for (Idx j = 2; j <
this->nbrDim(); j++) {
86 template <
typename GUM_SCALAR >
87 INLINE Idx Amplitude< GUM_SCALAR >::fold_(
const DiscreteVariable& v,
90 bool& stop_iteration)
const {