48#ifndef GUM_MULTI_DIM_COMBINE_AND_PROJECT_DEFAULT_H
49#define GUM_MULTI_DIM_COMBINE_AND_PROJECT_DEFAULT_H
65 template <
class TABLE >
119 const bool is_result_persistent =
false) const final;
123 const
bool is_result_persistent = false) const final;
209 std::pair<
double,
double >
231#include <agrum/base/multidim/utils/operators/multiDimCombineAndProjectDefault_tpl.h>
Base class for discrete random variable.
The Table-agnostic base class of scheduleMultiDim.
A generic interface to combine efficiently several MultiDim tables.
void _freeData_(std::vector< const IScheduleMultiDim * > &tables, std::vector< ScheduleOperator * > &operations) const
free the scheduling memory
MultiDimCombination< TABLE > * _combination_
the class used for the combinations
Set< const TABLE * > execute(const Set< const TABLE * > &set, const gum::VariableSet &del_vars) final
creates and returns the result of the projection over the variables not in del_vars of the combinatio...
MultiDimCombineAndProjectDefault(const MultiDimCombineAndProjectDefault< TABLE > &)
Copy constructor.
std::pair< double, double > memoryUsage(const Set< const TABLE * > &set, const gum::VariableSet &del_vars) const final
returns the memory consumption used during the combinations and projections
void setCombinationFunction(TABLE(*combine)(const TABLE &, const TABLE &)) final
changes the function used for combining two TABLES
typename MultiDimCombineAndProject< TABLE >::value_type value_type
MultiDimCombineAndProjectDefault(TABLE(*combine)(const TABLE &, const TABLE &), TABLE(*project)(const TABLE &, const gum::VariableSet &))
Default constructor.
MultiDimProjection< TABLE > * _projection_
the class used for the projections
void setProjectionClass(const MultiDimProjection< TABLE > &proj_class) final
Changes the class that performs the projections.
virtual ~MultiDimCombineAndProjectDefault()
Destructor.
TABLE(*)(const TABLE &, const TABLE &) combinationFunction()
Returns the current combination function.
TABLE(*)(const TABLE &, const gum::VariableSet &) projectionFunction()
returns the current projection function
void setCombinationClass(const MultiDimCombination< TABLE > &comb_class) final
changes the class that performs the combinations
void setProjectionFunction(TABLE(*proj)(const TABLE &, const gum::VariableSet &)) final
Changes the function used for projecting TABLES.
virtual MultiDimCombineAndProjectDefault< TABLE > * clone() const
virtual constructor
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 final
returns the set of operations to perform to make all the combinations and projections
double nbOperations(const Set< const TABLE * > &set, const gum::VariableSet &del_vars) const final
returns a rough estimate of the number of operations that will be performed to compute the combinatio...
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
typename TableType< TABLE >::value_type value_type
the type of the values contained into TABLE
MultiDimCombineAndProject()
default constructor
A generic class to project efficiently a MultiDim table over a subset of its variables.
the base class for "low-level" operators used to schedule inferences
The generic class for storing (ordered) sequences of objects.
gum is the global namespace for all aGrUM entities
Set< const DiscreteVariable * > VariableSet