aGrUM  0.16.0
multiDimCombination.h
Go to the documentation of this file.
1 
29 #ifndef GUM_MULTI_DIM_COMBINATION_H
30 #define GUM_MULTI_DIM_COMBINATION_H
31 
32 #include <agrum/core/sequence.h>
33 #include <agrum/core/set.h>
35 #include <utility>
36 
37 namespace gum {
38 
96  template < typename GUM_SCALAR, template < typename > class TABLE >
98  public:
99  // =========================================================================
101  // =========================================================================
103 
106 
109 
111  virtual ~MultiDimCombination();
112 
120 
122  // =========================================================================
124  // =========================================================================
126 
137  virtual TABLE< GUM_SCALAR >*
138  combine(const Set< const TABLE< GUM_SCALAR >* >& set) = 0;
139  virtual void combine(TABLE< GUM_SCALAR >& container,
140  const Set< const TABLE< GUM_SCALAR >* >& set) = 0;
141 
143  virtual void setCombineFunction(TABLE< GUM_SCALAR >* (*combine)(
144  const TABLE< GUM_SCALAR >&, const TABLE< GUM_SCALAR >&)) = 0;
145 
147  virtual TABLE< GUM_SCALAR >* (*combineFunction())(
148  const TABLE< GUM_SCALAR >&, const TABLE< GUM_SCALAR >&) = 0;
149 
154  virtual float
155  nbOperations(const Set< const TABLE< GUM_SCALAR >* >& set) const = 0;
156  virtual float nbOperations(
157  const Set< const Sequence< const DiscreteVariable* >* >& set) const = 0;
158 
171  virtual std::pair< long, long >
172  memoryUsage(const Set< const TABLE< GUM_SCALAR >* >& set) const = 0;
173  virtual std::pair< long, long > memoryUsage(
174  const Set< const Sequence< const DiscreteVariable* >* >& set) const = 0;
175 
176  private:
180 
182  };
183 
184 } /* namespace gum */
185 
186 // always include the template implementation
188 
189 #endif /* GUM_MULTI_DIM_COMBINATION_H */
virtual TABLE< GUM_SCALAR > * combine(const Set< const TABLE< GUM_SCALAR > * > &set)=0
creates and returns the result of the combination of the tables within set
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 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.
The generic class for storing (ordered) sequences of objects.
Definition: sequence.h:1022
MultiDimCombination()
default constructor
virtual TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &) combineFunction()
returns the combination function currently used by the combinator
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 std::pair< long, long > memoryUsage(const Set< const TABLE< GUM_SCALAR > * > &set) const =0
Returns the memory consumption used during the combination.
virtual MultiDimCombination< GUM_SCALAR, TABLE > * newFactory() const =0
virtual constructor
MultiDimCombination< GUM_SCALAR, TABLE > & operator=(const MultiDimCombination< GUM_SCALAR, TABLE > &)
forbid copy operators
virtual ~MultiDimCombination()
destructor
A generic interface to combine efficiently several MultiDim tables.
virtual float nbOperations(const Set< const TABLE< GUM_SCALAR > * > &set) const =0
returns a rough estimate of the number of operations that will be performed to compute the combinatio...