48#ifndef GUM_MULTI_DIM_COMBINE_AND_PROJECT_H
49#define GUM_MULTI_DIM_COMBINE_AND_PROJECT_H
68 template <
class TABLE >
70#ifndef DOXYGEN_SHOULD_SKIP_THIS
72 template <
typename T >
77 template <
template <
typename,
typename... >
class CONTAINER, typename T, typename... Args >
78 struct TableType< CONTAINER< T, Args... > > {
85 using value_type =
typename TableType< TABLE >::value_type;
135 const bool is_result_persistent =
false)
const
138 operations(
const std::vector< const IScheduleMultiDim* >& original_tables,
140 const bool is_result_persistent =
false)
const
149 const bool is_result_persistent =
false)
const;
233 virtual std::pair< double, double >
A generic interface to combine efficiently several MultiDim tables.
MultiDimCombineAndProject< TABLE > & operator=(const MultiDimCombineAndProject< TABLE > &)
forbid copy operators
virtual TABLE(*)(const TABLE &, const TABLE &) combinationFunction()
returns the current combination function
virtual TABLE(*)(const TABLE &, const gum::VariableSet &) projectionFunction()
returns the current projection function
virtual ~MultiDimCombineAndProject()
destructor
Set< const IScheduleMultiDim * > schedule(Schedule &schedule, const Set< const IScheduleMultiDim * > &original_tables, const gum::VariableSet &del_vars, const bool is_result_persistent=false) const
add to a given schedule the set of operations needed to perform all the combinations and projections
virtual std::pair< double, double > memoryUsage(const Set< const Sequence< const DiscreteVariable * > * > &set, const gum::VariableSet &del_vars) const =0
returns the memory consumption used during the combinations and projections
virtual void setProjectionClass(const MultiDimProjection< TABLE > &proj_class)=0
Changes the class that performs the projections.
virtual std::pair< double, double > memoryUsage(const Set< const TABLE * > &set, const gum::VariableSet &del_vars) const =0
returns the memory consumption used during the combinations and projections
virtual MultiDimCombineAndProject< TABLE > * clone() const =0
virtual constructor
typename TableType< TABLE >::value_type value_type
the type of the values contained into TABLE
MultiDimCombineAndProject()
default constructor
virtual double nbOperations(const Set< const TABLE * > &set, const gum::VariableSet &del_vars) const =0
returns a rough estimate of the number of operations that will be performed to compute the combinatio...
virtual std::pair< std::vector< ScheduleOperator * >, Set< const IScheduleMultiDim * > > operations(const std::vector< const IScheduleMultiDim * > &original_tables, const gum::VariableSet &del_vars, const bool is_result_persistent=false) const =0
returns the current combination function
virtual void setCombinationFunction(TABLE(*combine)(const TABLE &, const TABLE &))=0
changes the function used for combining two TABLES
virtual std::pair< std::vector< ScheduleOperator * >, Set< const IScheduleMultiDim * > > operations(const Set< const IScheduleMultiDim * > &original_tables, const gum::VariableSet &del_vars, const bool is_result_persistent=false) const =0
returns the set of operations to perform to make all the combinations and projections
virtual Set< const TABLE * > execute(const Set< const TABLE * > &set, const gum::VariableSet &del_vars)=0
creates and returns the result of the projection over the variables not in del_vars of the combinatio...
MultiDimCombineAndProject(const MultiDimCombineAndProject< TABLE > &)
copy constructor
virtual void setProjectionFunction(TABLE(*proj)(const TABLE &, const gum::VariableSet &))=0
changes the function used for projecting TABLES
virtual void setCombinationClass(const MultiDimCombination< TABLE > &comb_class)=0
f
virtual double nbOperations(const Set< const Sequence< const DiscreteVariable * > * > &set, const gum::VariableSet &del_vars) const =0
returns a rough estimate of the number of operations that will be performed to compute the combinatio...
A generic class to project efficiently a MultiDim table over a subset of its variables.
Class containing a schedule of operations to perform on multidims.
The generic class for storing (ordered) sequences of objects.
A generic interface to combine and project efficiently MultiDim tables.
gum is the global namespace for all aGrUM entities
Set< const DiscreteVariable * > VariableSet