27 #ifndef GUM_MULTI_DIM_PROJECTION_H 28 #define GUM_MULTI_DIM_PROJECTION_H 32 #include <agrum/tools/core/sequence.h> 33 #include <agrum/tools/core/set.h> 34 #include <agrum/tools/variables/discreteVariable.h> 87 template <
typename GUM_SCALAR,
template <
typename >
class TABLE >
97 const Set<
const DiscreteVariable* >&));
130 TABLE< GUM_SCALAR >*
project(
const TABLE< GUM_SCALAR >& table,
131 const Set<
const DiscreteVariable* >& del_vars);
133 void project(TABLE< GUM_SCALAR >& container,
134 const TABLE< GUM_SCALAR >& table,
135 const Set<
const TABLE< GUM_SCALAR >* >& del_vars);
139 const Set<
const DiscreteVariable* >&));
142 TABLE< GUM_SCALAR >* (*projectFunction())(
const TABLE< GUM_SCALAR >&,
143 const Set<
const DiscreteVariable* >&);
150 const Set<
const DiscreteVariable* >& del_vars)
const;
156 float nbOperations(
const Sequence<
const DiscreteVariable* >& vars,
157 const Set<
const DiscreteVariable* >& del_vars)
const;
171 std::pair<
long,
long >
memoryUsage(
const TABLE< GUM_SCALAR >& table,
172 const Set<
const DiscreteVariable* >& del_vars)
const;
186 std::pair<
long,
long >
memoryUsage(
const Sequence<
const DiscreteVariable* >& vars,
187 const Set<
const DiscreteVariable* >& del_vars)
const;
193 TABLE< GUM_SCALAR >* (*proj_)(
const TABLE< GUM_SCALAR >&,
194 const Set<
const DiscreteVariable* >&);
205 #include <agrum/tools/multidim/utils/operators/multiDimProjection_tpl.h> std::pair< long, long > memoryUsage(const Sequence< const DiscreteVariable * > &vars, const Set< const DiscreteVariable * > &del_vars) const
Returns the memory consumption used during the projection.
INLINE void emplace(Args &&... args)
MultiDimProjection(TABLE< GUM_SCALAR > *(*proj)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))
Default constructor.
void project(TABLE< GUM_SCALAR > &container, const TABLE< GUM_SCALAR > &table, const Set< const TABLE< GUM_SCALAR > * > &del_vars)
Creates and returns the projection of the table over a subset of its vars.
std::pair< long, long > memoryUsage(const TABLE< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars) const
Returns the memory consumption used during the projection.
virtual MultiDimProjection< GUM_SCALAR, TABLE > * newFactory() const
virtual constructor
MultiDimProjection(const MultiDimProjection< GUM_SCALAR, TABLE > &)
Copy constructor.
virtual ~MultiDimProjection()
Destructor.
MultiDimProjection< GUM_SCALAR, TABLE > & operator=(const MultiDimProjection< GUM_SCALAR, TABLE > &)
Forbid copy operators.
float nbOperations(const Sequence< const DiscreteVariable * > &vars, const Set< const DiscreteVariable * > &del_vars) const
returns a rough estimate of the number of operations that will be performed to compute the projection...
float nbOperations(const TABLE< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars) const
returns a rough estimate of the number of operations that will be performed to compute the projection...
A generic class to project efficiently a MultiDim table over a subset of its variables.
void setProjectFunction(TABLE< GUM_SCALAR > *(*proj)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))
Changes the function used for projecting TABLES.
TABLE< GUM_SCALAR > * project(const TABLE< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars)
Creates and returns the projection of the table over a subset of its vars.