47#ifndef GUM_MULTI_DIM_PROJECTION_H
48#define GUM_MULTI_DIM_PROJECTION_H
108 template <
class TABLE >
110#ifndef DOXYGEN_SHOULD_SKIP_THIS
112 template <
typename T >
117 template <
template <
typename,
typename... >
class CONTAINER, typename T, typename... Args >
118 struct TableType< CONTAINER< T, Args... > > {
173 std::pair< ScheduleOperator*, const IScheduleMultiDim* >
176 const bool is_result_persistent =
false)
const;
193 const bool is_result_persistent =
false)
const;
The Table-agnostic base class of scheduleMultiDim.
TABLE(* proj_)(const TABLE &, const gum::VariableSet &)
The projection function actually used.
double nbOperations(const TABLE &table, const gum::VariableSet &del_vars) const
returns a rough estimate of the number of operations that will be performed to compute the projection...
std::pair< ScheduleOperator *, const IScheduleMultiDim * > operations(const IScheduleMultiDim *table, const gum::VariableSet &del_vars, const bool is_result_persistent=false) const
returns operation to perform as well as the result of the projection
void setProjectionFunction(TABLE(*proj)(const TABLE &, const gum::VariableSet &))
Changes the function used for projecting TABLES.
MultiDimProjection(const MultiDimProjection< TABLE > &)
Copy constructor.
virtual ~MultiDimProjection()
Destructor.
typename TableType< TABLE >::value_type value_type
the type of the values contained into TABLE
TABLE(*)(const TABLE &, const gum::VariableSet &) projectionFunction()
Returns the projection function currently used by the projector.
const IScheduleMultiDim * schedule(Schedule &schedule, const IScheduleMultiDim *table, const gum::VariableSet &del_vars, const bool is_result_persistent=false) const
add to a given schedule the set of operations needed to perform the projection
std::pair< double, double > memoryUsage(const TABLE &table, const gum::VariableSet &del_vars) const
Returns the memory consumption used during the projection.
MultiDimProjection(TABLE(*proj)(const TABLE &, const gum::VariableSet &))
Default constructor.
std::pair< double, double > memoryUsage(const Sequence< const DiscreteVariable * > &vars, const gum::VariableSet &del_vars) const
Returns the memory consumption used during the projection.
void execute(TABLE &container, const TABLE &table, const gum::VariableSet &del_vars) const
Returns the projection function currently used by the projector.
virtual MultiDimProjection< TABLE > * clone() const
virtual constructor
double nbOperations(const Sequence< const DiscreteVariable * > &vars, const gum::VariableSet &del_vars) const
returns a rough estimate of the number of operations that will be performed to compute the projection...
TABLE * execute(const TABLE &table, const gum::VariableSet &del_vars) const
Creates and returns the projection of the table over a subset of its vars.
MultiDimProjection< TABLE > & operator=(const MultiDimProjection< TABLE > &)
Forbid copy operators.
Class containing a schedule of operations to perform on multidims.
The generic class for storing (ordered) sequences of objects.
A generic interface to project efficiently a MultiDim table over a subset of its variables.
gum is the global namespace for all aGrUM entities
Set< const DiscreteVariable * > VariableSet
Class containing a schedule of operations to perform on multidims.