aGrUM  0.16.0
multiDimCombineAndProject.h
Go to the documentation of this file.
1 
29 #ifndef GUM_MULTI_DIM_COMBINE_AND_PROJECT_H
30 #define GUM_MULTI_DIM_COMBINE_AND_PROJECT_H
31 
32 #include <utility>
33 
34 #include <agrum/core/sequence.h>
35 #include <agrum/core/set.h>
37 
38 namespace gum {
39 
40  // clang-format off
48  // clang-format on
49  template < typename GUM_SCALAR, template < typename > class TABLE >
51  public:
52  // ========================================================================
54  // ========================================================================
56 
59 
63 
66 
74 
76  // ========================================================================
78  // ========================================================================
80 
92  combineAndProject(Set< const TABLE< GUM_SCALAR >* > set,
93  Set< const DiscreteVariable* > del_vars) = 0;
94 
96  virtual void setCombineFunction(TABLE< GUM_SCALAR >* (*combine)(
97  const TABLE< GUM_SCALAR >&, const TABLE< GUM_SCALAR >&)) = 0;
98 
100  virtual TABLE< GUM_SCALAR >* (*combineFunction())(
101  const TABLE< GUM_SCALAR >&, const TABLE< GUM_SCALAR >&) = 0;
102 
104  virtual void setProjectFunction(TABLE< GUM_SCALAR >* (*proj)(
105  const TABLE< GUM_SCALAR >&, const Set< const DiscreteVariable* >&)) = 0;
106 
108  virtual TABLE< GUM_SCALAR >* (*projectFunction())(
109  const TABLE< GUM_SCALAR >&, const Set< const DiscreteVariable* >&) = 0;
110 
115  virtual float
116  nbOperations(const Set< const TABLE< GUM_SCALAR >* >& set,
117  const Set< const DiscreteVariable* >& del_vars) const = 0;
118  virtual std::pair< long, long >
120  Set< const DiscreteVariable* > del_vars) const = 0;
121 
123 
124  private:
128  };
129 
130 } /* namespace gum */
131 
132 // always include the template implementation
134 
135 #endif /* GUM_MULTI_DIM_COMBINE_AND_PROJECT_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 TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &) combineFunction()
returns the current combination function
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual void setProjectFunction(TABLE< GUM_SCALAR > *(*proj)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))=0
changes the function used for projecting TABLES
A generic interface to combine and project efficiently MultiDim tables.
The generic class for storing (ordered) sequences of objects.
Definition: sequence.h:1022
virtual void setCombineFunction(TABLE< GUM_SCALAR > *(*combine)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &))=0
changes the function used for combining two TABLES
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
Representation of a setA Set is a structure that contains arbitrary elements.
Definition: set.h:165
virtual TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable *> &) projectFunction()
returns the current projection function
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...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.