aGrUM  0.14.2
scheduleProject.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  ***************************************************************************/
26 #ifndef GUM_SCHEDULE_PROJECT_H
27 #define GUM_SCHEDULE_PROJECT_H
28 
29 #include <string>
30 
31 #include <agrum/agrum.h>
32 
33 #include <agrum/core/sequence.h>
34 #include <agrum/core/set.h>
39 
40 namespace gum {
41 
42  template < typename GUM_SCALAR >
43 
44  class ScheduleProject : public ScheduleOperation< GUM_SCALAR > {
45  public:
46  // ############################################################################
48  // ############################################################################
50 
52 
54  const Set< const DiscreteVariable* >& del_vars,
58 
61 
64 
66  virtual ~ScheduleProject();
67 
69 
70  // ############################################################################
72  // ############################################################################
74 
77 
79 
82 
84 
87 
89 
90  // ############################################################################
92  // ############################################################################
94 
96  void execute();
97 
100  float nbOperations() const;
101 
103 
111  std::pair< long, long > memoryUsage() const;
112 
115  const ScheduleMultiDim< GUM_SCALAR >& result() const;
116 
119 
122  multiDimResults() const;
123 
125  std::string toString() const;
126 
128 
129  private:
130  // the table to project
132 
133  // the set of variables that should be removed from the table
135 
138 
141 
144 
149  };
150 
151 } /* namespace gum */
152 
153 // always include the template implementation
155 
156 #endif /* GUM_SCHEDULE_PROJECTION_H */
virtual ScheduleProject< GUM_SCALAR > * newFactory() const
virtual copy constructor: creates a clone of the operation
const ScheduleMultiDim< GUM_SCALAR > & result() const
returns the scheduleMultidim resulting from the execution of the operation
a MultiDimImplementation Wrapper used for scheduling inferences
Base class for discrete random variable.
Header file of gum::Sequence, a class for storing (ordered) sequences of objects. ...
a MultiDimImplementation Wrapper used for scheduling inferences
Sets of elements (i.e.
std::pair< long, long > memoryUsage() const
returns the memory consumption used during the operation
a Projection operator class used for scheduling inferences
float nbOperations() const
returns an estimation of the number of elementary operations needed to perform the ScheduleOperation ...
The generic class for storing (ordered) sequences of objects.
Definition: sequence.h:1019
ScheduleMultiDim< GUM_SCALAR > __table
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
void execute()
executes the operation
const Sequence< const ScheduleMultiDim< GUM_SCALAR > *> & multiDimArgs() const
returns the set of multidims passed in argument to the operation
Headers of gum::MultiDimImplementation.
bool operator!=(const ScheduleOperation< GUM_SCALAR > &) const
operator !=
ScheduleMultiDim< GUM_SCALAR > * __result
the result of the operation
Representation of a setA Set is a structure that contains arbitrary elements.
Definition: set.h:162
Sequence< const ScheduleMultiDim< GUM_SCALAR > *> * __results
the set of ScheduleMultidims resulting from the operation
virtual ~ScheduleProject()
destructor
std::string toString() const
displays the content of the operation
the base operation class used to schedule inferences
const Sequence< const ScheduleMultiDim< GUM_SCALAR > *> & multiDimResults() const
returns the set of multidims that should be the result of the operation
bool operator==(const ScheduleOperation< GUM_SCALAR > &) const
operator ==
ScheduleProject(const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, MultiDimImplementation< GUM_SCALAR > *(*project)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))
default constructor
ScheduleProject< GUM_SCALAR > & operator=(const ScheduleProject< GUM_SCALAR > &)
copy operator
<agrum/multidim/multiDimImplementation.h>
Set< const DiscreteVariable *> __del_vars
Sequence< const ScheduleMultiDim< GUM_SCALAR > *> * __args
the set of ScheduleMultidims passed in arguments