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() : MultiDimAggregator< GUM_SCALAR >() {
41 GUM_CONSTRUCTOR(Amplitude);
44 template <
typename GUM_SCALAR >
45 INLINE Amplitude< GUM_SCALAR >::Amplitude(
const Amplitude< GUM_SCALAR >& from) :
46 MultiDimAggregator< GUM_SCALAR >(from) {
47 GUM_CONS_CPY(Amplitude);
50 template <
typename GUM_SCALAR >
51 INLINE Amplitude< GUM_SCALAR >::~Amplitude() {
52 GUM_DESTRUCTOR(Amplitude);
55 template <
typename GUM_SCALAR >
56 INLINE std::string Amplitude< GUM_SCALAR >::aggregatorName()
const {
62 template <
typename GUM_SCALAR >
63 INLINE MultiDimContainer< GUM_SCALAR >* Amplitude< GUM_SCALAR >::newFactory()
const {
64 return new Amplitude< GUM_SCALAR >();
67 template <
typename GUM_SCALAR >
68 Idx Amplitude< GUM_SCALAR >::buildValue_(
const gum::Instantiation& i)
const {
70 if (i.nbrDim() < 2)
return 0;
75 for (Idx j = 2; j <
this->nbrDim(); j++) {
83 template <
typename GUM_SCALAR >
84 INLINE Idx Amplitude< GUM_SCALAR >::fold_(
const DiscreteVariable& v,
87 bool& stop_iteration)
const {