aGrUM  0.14.2
scheduleProjection.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
62 #ifndef GUM_SCHEDULE_PROJECTION_H
63 #define GUM_SCHEDULE_PROJECTION_H
64 
65 #include <agrum/core/set.h>
69 #include <utility>
70 
71 namespace gum {
72 
73  template < typename GUM_SCALAR >
75  public:
76  // ############################################################################
78  // ############################################################################
80 
83 
86 
88  virtual ~ScheduleProjection();
89 
91 
93  virtual ScheduleProjection< GUM_SCALAR >* newFactory() const = 0;
94 
96 
97  // ############################################################################
99  // ############################################################################
101 
104 
112  const Set< const DiscreteVariable* >& del_vars,
113  Schedule< GUM_SCALAR >& schedule) = 0;
116  const Set< const DiscreteVariable* >& del_vars,
117  Schedule< GUM_SCALAR >& schedule);
118  template < template < typename > class TABLE >
120  project(const TABLE< GUM_SCALAR >& table,
121  const Set< const DiscreteVariable* >& del_vars,
122  Schedule< GUM_SCALAR >& schedule);
123 
127  const Set< const DiscreteVariable* >&)) = 0;
128 
132  const Set< const DiscreteVariable* >&) = 0;
133 
136  virtual float nbOperations(const ScheduleMultiDim< GUM_SCALAR >& table,
137  const Set< const DiscreteVariable* >& del_vars,
138  const Schedule< GUM_SCALAR >& schedule) = 0;
140  const Set< const DiscreteVariable* >& del_vars,
141  const Schedule< GUM_SCALAR >& schedule);
142  template < template < typename > class TABLE >
143  float nbOperations(const TABLE< GUM_SCALAR >& set,
144  const Set< const DiscreteVariable* >& del_vars,
145  const Schedule< GUM_SCALAR >& schedule);
146 
148 
156  virtual std::pair< long, long >
158  const Set< const DiscreteVariable* >& del_vars,
159  const Schedule< GUM_SCALAR >& schedule) = 0;
160  std::pair< long, long >
162  const Set< const DiscreteVariable* >& del_vars,
163  const Schedule< GUM_SCALAR >& schedule);
164  template < template < typename > class TABLE >
165  std::pair< long, long >
166  memoryUsage(const TABLE< GUM_SCALAR >& table,
167  const Set< const DiscreteVariable* >& del_vars,
168  const Schedule< GUM_SCALAR >& schedule);
169 
171 
172  private:
176  };
177 
178 } /* namespace gum */
179 
180 // always include the template implementation
182 
183 #endif /* GUM_SCHEDULE_PROJECTION_H */
virtual ScheduleProjection< GUM_SCALAR > * newFactory() const =0
virtual constructor
ScheduleProjection()
default constructor
virtual MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable *> &) projectFunction()
returns the projection function currently used by the projector
a MultiDimImplementation Wrapper used for scheduling inferences
Base class for discrete random variable.
a MultiDimImplementation Wrapper used for scheduling inferences
Sets of elements (i.e.
virtual ~ScheduleProjection()
destructor
A generic class to project efficiently a ScheduleMultiDim over a subset of its variables.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
virtual void setProjectFunction(MultiDimImplementation< GUM_SCALAR > *(*proj)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))=0
changes the function used for projecting tables
Representation of a setA Set is a structure that contains arbitrary elements.
Definition: set.h:162
virtual float nbOperations(const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)=0
returns a rough estimate of the number of operations that will be performed to compute the projection...
ScheduleProjection< GUM_SCALAR > & operator=(const ScheduleProjection< GUM_SCALAR > &)
to be coherent with combinations, forbid copy operators
Class containing a schedule of operations to perform on multidims.
virtual std::pair< long, long > memoryUsage(const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)=0
returns the memory consumption used during the projection
Class containing a schedule of operations to perform on multidims.
Definition: schedule.h:65
virtual ScheduleMultiDim< GUM_SCALAR > project(const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, Schedule< GUM_SCALAR > &schedule)=0
creates and returns the projection of the table over a subset of its vars
<agrum/multidim/multiDimImplementation.h>