aGrUM  0.16.0
scheduleCombination.h
Go to the documentation of this file.
1 
77 #ifndef GUM_SCHEDULE_COMBINATION_H
78 #define GUM_SCHEDULE_COMBINATION_H
79 
80 #include <agrum/core/set.h>
84 #include <utility>
85 
86 namespace gum {
87 
88  template < typename GUM_SCALAR >
90  public:
91  // ############################################################################
93  // ############################################################################
95 
98 
101 
103  virtual ~ScheduleCombination();
104 
106 
108  virtual ScheduleCombination< GUM_SCALAR >* newFactory() const = 0;
109 
111 
112  // ############################################################################
114  // ############################################################################
116 
117  // adds operations to an already created schedule
122  combine(const Set< const ScheduleMultiDim< GUM_SCALAR >* >& set,
123  Schedule< GUM_SCALAR >& schedule) = 0;
125  combine(const Set< const MultiDimImplementation< GUM_SCALAR >* >& set,
126  Schedule< GUM_SCALAR >& schedule);
127  template < template < typename > class TABLE >
129  combine(const Set< const TABLE< GUM_SCALAR >* >& set,
130  Schedule< GUM_SCALAR >& schedule);
131 
134  *combine)(const MultiDimImplementation< GUM_SCALAR >&,
136 
141 
144  virtual float
145  nbOperations(const Set< const ScheduleMultiDim< GUM_SCALAR >* >& set,
146  const Schedule< GUM_SCALAR >& schedule) = 0;
147  float
149  const Schedule< GUM_SCALAR >& schedule);
150  template < template < typename > class TABLE >
151  float nbOperations(const Set< const TABLE< GUM_SCALAR >* >& set,
152  const Schedule< GUM_SCALAR >& schedule);
153 
155 
163  virtual std::pair< long, long >
164  memoryUsage(const Set< const ScheduleMultiDim< GUM_SCALAR >* >& set,
165  const Schedule< GUM_SCALAR >& schedule) = 0;
166  std::pair< long, long >
168  const Schedule< GUM_SCALAR >& schedule);
169  template < template < typename > class TABLE >
170  std::pair< long, long >
171  memoryUsage(const Set< const TABLE< GUM_SCALAR >* >& set,
172  const Schedule< GUM_SCALAR >& schedule);
173 
175 
176  private:
180  };
181 
182 } /* namespace gum */
183 
184 // always include the template implementation
186 
187 #endif /* GUM_SCHEDULE_COMBINATION_H */
virtual float nbOperations(const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)=0
returns a rough estimate of the number of operations that will be performed to compute the combinatio...
ScheduleCombination()
default constructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
a MultiDimImplementation Wrapper used for scheduling inferences
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual std::pair< long, long > memoryUsage(const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)=0
returns the memory consumption used during the combination
ScheduleCombination< GUM_SCALAR > & operator=(const ScheduleCombination< GUM_SCALAR > &)
forbid copy operators
virtual ScheduleMultiDim< GUM_SCALAR > combine(const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, Schedule< GUM_SCALAR > &schedule)=0
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
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 > &))=0
changes the function used for combining two TABLES
virtual ScheduleCombination< GUM_SCALAR > * newFactory() const =0
virtual constructor
virtual ~ScheduleCombination()
destructor
Representation of a setA Set is a structure that contains arbitrary elements.
Definition: set.h:165
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Class containing a schedule of operations to perform on multidims.
Definition: schedule.h:68
<agrum/multidim/multiDimImplementation.h>
virtual MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const MultiDimImplementation< 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.