28 #ifndef GUM_MULTI_DIM_COMBINE_AND_PROJECT_H 29 #define GUM_MULTI_DIM_COMBINE_AND_PROJECT_H 33 #include <agrum/tools/core/sequence.h> 34 #include <agrum/tools/core/set.h> 35 #include <agrum/tools/variables/discreteVariable.h> 48 template <
typename GUM_SCALAR,
template <
typename >
class TABLE >
95 virtual void setCombineFunction(TABLE< GUM_SCALAR >* (*combine)(
const TABLE< GUM_SCALAR >&,
96 const TABLE< GUM_SCALAR >&))
100 virtual TABLE< GUM_SCALAR >* (*combineFunction())(
const TABLE< GUM_SCALAR >&,
101 const TABLE< GUM_SCALAR >&)
107 const Set<
const DiscreteVariable* >&))
111 virtual TABLE< GUM_SCALAR >* (*projectFunction())(
const TABLE< GUM_SCALAR >&,
112 const Set<
const DiscreteVariable* >&)
119 virtual float nbOperations(
const Set<
const TABLE< GUM_SCALAR >* >& set,
120 const Set<
const DiscreteVariable* >& del_vars)
const = 0;
121 virtual std::pair<
long,
long >
122 memoryUsage(
const Set<
const Sequence<
const DiscreteVariable* >* >& set,
123 Set<
const DiscreteVariable* > del_vars)
const = 0;
136 #include <agrum/tools/multidim/utils/operators/multiDimCombineAndProject_tpl.h> virtual std::pair< long, long > memoryUsage(const Set< const Sequence< const DiscreteVariable * > * > &set, Set< const DiscreteVariable * > del_vars) const =0
creates and returns the result of the projection over the variables not in del_vars of the combinatio...
virtual void setProjectFunction(TABLE< GUM_SCALAR > *(*proj)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))=0
changes the function used for projecting TABLES
INLINE void emplace(Args &&... args)
A generic interface to combine and project efficiently MultiDim tables.
virtual void setCombineFunction(TABLE< GUM_SCALAR > *(*combine)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &))=0
changes the function used for combining two TABLES
MultiDimCombineAndProject(const MultiDimCombineAndProject< GUM_SCALAR, TABLE > &)
copy constructor
virtual Set< const TABLE< GUM_SCALAR > *> combineAndProject(Set< const TABLE< GUM_SCALAR > * > set, Set< const DiscreteVariable * > del_vars)=0
creates and returns the result of the projection over the variables not in del_vars of the combinatio...
MultiDimCombineAndProject< GUM_SCALAR, TABLE > & operator=(const MultiDimCombineAndProject< GUM_SCALAR, TABLE > &)
forbid copy operators
virtual ~MultiDimCombineAndProject()
destructor
virtual MultiDimCombineAndProject< GUM_SCALAR, TABLE > * newFactory() const =0
virtual constructor
MultiDimCombineAndProject()
default constructor
virtual float nbOperations(const Set< const TABLE< GUM_SCALAR > * > &set, const Set< const DiscreteVariable * > &del_vars) const =0
returns a rough estimate of the number of operations that will be performed to compute the combinatio...