aGrUM  0.14.2
scheduleProjectionBasic.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_BASIC_H
63 #define GUM_SCHEDULE_PROJECTION_BASIC_H
64 
66 
67 namespace gum {
68 
69  template < typename GUM_SCALAR >
70  class ScheduleProjectionBasic : public ScheduleProjection< GUM_SCALAR > {
71  public:
72  // ############################################################################
74  // ############################################################################
76 
81 
84 
86  virtual ~ScheduleProjectionBasic();
87 
89 
92 
94 
95  // ############################################################################
97  // ############################################################################
99 
102 
110  const Set< const DiscreteVariable* >& del_vars,
111  Schedule< GUM_SCALAR >& schedule);
114  const Set< const DiscreteVariable* >& del_vars,
115  Schedule< GUM_SCALAR >& schedule);
116  template < template < typename > class TABLE >
118  project(const TABLE< GUM_SCALAR >& table,
119  const Set< const DiscreteVariable* >& del_vars,
120  Schedule< GUM_SCALAR >& schedule);
121 
126 
131 
134  virtual float nbOperations(const ScheduleMultiDim< GUM_SCALAR >& table,
135  const Set< const DiscreteVariable* >& del_vars,
136  const Schedule< GUM_SCALAR >& schedule);
138  const Set< const DiscreteVariable* >& del_vars,
139  const Schedule< GUM_SCALAR >& schedule);
140  template < template < typename > class TABLE >
141  float nbOperations(const TABLE< GUM_SCALAR >& set,
142  const Set< const DiscreteVariable* >& del_vars,
143  const Schedule< GUM_SCALAR >& schedule);
144 
146 
154  virtual std::pair< long, long >
156  const Set< const DiscreteVariable* >& del_vars,
157  const Schedule< GUM_SCALAR >& schedule);
158  std::pair< long, long >
160  const Set< const DiscreteVariable* >& del_vars,
161  const Schedule< GUM_SCALAR >& schedule);
162  template < template < typename > class TABLE >
163  std::pair< long, long >
164  memoryUsage(const TABLE< GUM_SCALAR >& table,
165  const Set< const DiscreteVariable* >& del_vars,
166  const Schedule< GUM_SCALAR >& schedule);
167 
169 
170  protected:
175 
176  private:
180  };
181 
182 } /* namespace gum */
183 
184 // always include the template implementation
186 
187 #endif /* GUM_SCHEDULE_PROJECTION_H */
virtual float nbOperations(const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)
returns a rough estimate of the number of operations that will be performed to compute the projection...
ScheduleProjectionBasic(MultiDimImplementation< GUM_SCALAR > *(*proj)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))
default constructor
a MultiDimImplementation Wrapper used for scheduling inferences
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
ScheduleProjectionBasic< GUM_SCALAR > & operator=(const ScheduleProjectionBasic< GUM_SCALAR > &)
to be coherent with combinations, forbid copy operators
virtual ~ScheduleProjectionBasic()
destructor
void setProjectFunction(MultiDimImplementation< GUM_SCALAR > *(*proj)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))
changes the function used for projecting tables
Representation of a setA Set is a structure that contains arbitrary elements.
Definition: set.h:162
ScheduleMultiDim< GUM_SCALAR > project(const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, Schedule< GUM_SCALAR > &schedule)
creates and returns the projection of the table over a subset of its vars
A generic class to project efficiently a ScheduleMultiDim over a subset of its variables.
MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable *> &) projectFunction()
returns the projection function currently used by the projector
Class containing a schedule of operations to perform on multidims.
Definition: schedule.h:65
<agrum/multidim/multiDimImplementation.h>
virtual std::pair< long, long > memoryUsage(const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)
returns the memory consumption used during the projection
virtual ScheduleProjectionBasic< GUM_SCALAR > * newFactory() const
virtual constructor