29 #ifndef GUM_MULTI_DIM_AGGREGATOR_H 30 #define GUM_MULTI_DIM_AGGREGATOR_H 32 #include <agrum/tools/multidim/implementations/multiDimReadOnly.h> 62 template <
typename GUM_SCALAR >
112 virtual GUM_SCALAR
get(
const Instantiation& i)
const override;
163 void copyFrom(
const MultiDimContainer< GUM_SCALAR >& src)
const override;
191 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 196 template <
typename GUM_SCALAR >
202 #include <agrum/tools/multidim/aggregators/multiDimAggregator_tpl.h> virtual ~MultiDimAggregator()
Class destructor.
MultiDimAggregator()
Default constructor.
MultiDimAggregator(const MultiDimAggregator< GUM_SCALAR > &from)
Copy constructor.
virtual Idx buildValue_(const gum::Instantiation &i) const
by default, buildValue_ uses a "fold" scheme and the user has to implement neutralElt_ and fold_ but ...
const std::string & name() const override
Returns the real name of the multiDimArray.
void setChangeNotification(const gum::Instantiation &) override
void setDecNotification(const gum::Instantiation &) override
INLINE void emplace(Args &&... args)
virtual std::string aggregatorName() const =0
void copyFrom(const MultiDimContainer< GUM_SCALAR > &src) const override
Copy of a multiDimICIModel.
std::string toString() const override
void changeNotification(const gum::Instantiation &, const gum::DiscreteVariable *const, gum::Idx, gum::Idx) override
<agrum/tools/multidim/aggregators/multiDimAggregator.h>
Size realSize() const override
void setIncNotification(const gum::Instantiation &) override
void setFirstNotification(const gum::Instantiation &) override
virtual Idx neutralElt_() const =0
neutralElt_() is the result value for the first application of fold_
void setLastNotification(const gum::Instantiation &) override
virtual Idx fold_(const DiscreteVariable &v, Idx i1, Idx i2, bool &stop_iteration) const =0
fold_ is applied on value i1 for variable v. the actual result for precedent applications is i2...
bool isDecomposable() const
virtual MultiDimContainer< GUM_SCALAR > * newFactory() const override=0
This method creates a clone of this object, withouth its content (including variable), you must use this method if you want to ensure that the generated object has the same type than the object containing the called newFactory()
bool decomposable_
decomposable_ indicates if the aggregator can be decomposed
virtual GUM_SCALAR get(const Instantiation &i) const override
std::ostream & operator<<(std::ostream &s, const MultiDimAggregator< GUM_SCALAR > &ag)
For friendly displaying the content of the array.
INLINE std::ostream & operator<<(std::ostream &s, const MultiDimAggregator< GUM_SCALAR > &ag)
For friendly displaying the content of the array.
std::string toString(const gum::Instantiation *i) const override