aGrUM  0.16.0
scheduleCombinationBasic.h
Go to the documentation of this file.
1 
77 #ifndef GUM_SCHEDULE_COMBINATION_BASIC_H
78 #define GUM_SCHEDULE_COMBINATION_BASIC_H
79 
80 #include <agrum/agrum.h>
81 
83 #include <agrum/core/sequence.h>
86 
87 namespace gum {
88 
89  template < typename GUM_SCALAR >
90  class ScheduleCombinationBasic : public ScheduleCombination< GUM_SCALAR > {
91  public:
92  // ############################################################################
94  // ############################################################################
96 
101 
104 
106  virtual ~ScheduleCombinationBasic();
107 
109 
112 
114 
115  // ############################################################################
117  // ############################################################################
119 
120  // adds to a given schedule the operations necessary to perform a
121  // combination
126  combine(const Set< const ScheduleMultiDim< GUM_SCALAR >* >& set,
129  combine(const Set< const MultiDimImplementation< GUM_SCALAR >* >& set,
131  template < template < typename > class TABLE >
133  combine(const Set< const TABLE< GUM_SCALAR >* >& set,
135 
138  *combine)(const MultiDimImplementation< GUM_SCALAR >&,
140 
145 
148  virtual float
149  nbOperations(const Set< const ScheduleMultiDim< GUM_SCALAR >* >& set,
150  const Schedule< GUM_SCALAR >& schedule);
151  float
153  const Schedule< GUM_SCALAR >& schedule);
154  template < template < typename > class TABLE >
155  float nbOperations(const Set< const TABLE< GUM_SCALAR >* >& set,
156  const Schedule< GUM_SCALAR >& schedule);
157 
159 
167  virtual std::pair< long, long >
168  memoryUsage(const Set< const ScheduleMultiDim< GUM_SCALAR >* >& set,
169  const Schedule< GUM_SCALAR >& schedule);
170  std::pair< long, long >
172  const Schedule< GUM_SCALAR >& schedule);
173  template < template < typename > class TABLE >
174  std::pair< long, long >
175  memoryUsage(const Set< const TABLE< GUM_SCALAR >* >& set,
176  const Schedule< GUM_SCALAR >& schedule);
177 
179 
180  protected:
185 
189  const Sequence< const DiscreteVariable* >& seq2) const;
190  };
191 
192 } /* namespace gum */
193 
194 // always include the template implementation
196 
197 #endif /* GUM_SCHEDULE_COMBINATION_BASIC_H */
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.
a MultiDimImplementation Wrapper used for scheduling inferences
virtual ~ScheduleCombinationBasic()
destructor
virtual float nbOperations(const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)
returns a rough estimate of the number of operations that will be performed to compute the combinatio...
The generic class for storing (ordered) sequences of objects.
Definition: sequence.h:1022
Size _combinedSize(const Sequence< const DiscreteVariable * > &seq1, const Sequence< const DiscreteVariable * > &seq2) const
returns the domain size of the Cartesian product of the union of all the variables in seq1 and seq2 ...
virtual ScheduleCombinationBasic< GUM_SCALAR > * newFactory() const
virtual constructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
virtual MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const MultiDimImplementation< GUM_SCALAR > &) combineFunction()
returns the combination function currently used by the combinator
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 ScheduleMultiDim< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)
returns the memory consumption used during the combination
ScheduleCombinationBasic(MultiDimImplementation< GUM_SCALAR > *(*combine)(const MultiDimImplementation< GUM_SCALAR > &, const MultiDimImplementation< GUM_SCALAR > &))
default constructor
virtual ScheduleMultiDim< GUM_SCALAR > combine(const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, Schedule< GUM_SCALAR > &)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual void setCombineFunction(MultiDimImplementation< GUM_SCALAR > *(*combine)(const MultiDimImplementation< GUM_SCALAR > &, const MultiDimImplementation< GUM_SCALAR > &))
changes the function used for combining two TABLES
Class containing a schedule of operations to perform on multidims.
Definition: schedule.h:68
<agrum/multidim/multiDimImplementation.h>
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.