![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
A generic interface to combine and project efficiently MultiDim tables. More...
#include <agrum/base/multidim/operators/multiDimCombineAndProject.h>
Public Types | |
| using | value_type = typename TableType< TABLE >::value_type |
| the type of the values contained into TABLE | |
Public Member Functions | |
Constructors / Destructors | |
| MultiDimCombineAndProject () | |
| default constructor | |
| MultiDimCombineAndProject (const MultiDimCombineAndProject< TABLE > &) | |
| copy constructor | |
| virtual | ~MultiDimCombineAndProject () |
| destructor | |
| virtual MultiDimCombineAndProject< TABLE > * | clone () const =0 |
| virtual constructor | |
Private Member Functions | |
| MultiDimCombineAndProject< TABLE > & | operator= (const MultiDimCombineAndProject< TABLE > &) |
| forbid copy operators | |
Accessors/Modifiers | |
| 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 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 combination of the tables within set | |
| 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 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 | |
| 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 void | setCombinationFunction (TABLE(*combine)(const TABLE &, const TABLE &))=0 |
| changes the function used for combining two TABLES | |
| virtual void | setCombinationClass (const MultiDimCombination< TABLE > &comb_class)=0 |
| f | |
| virtual void | setProjectionFunction (TABLE(*proj)(const TABLE &, const gum::VariableSet &))=0 |
| changes the function used for projecting TABLES | |
| virtual void | setProjectionClass (const MultiDimProjection< TABLE > &proj_class)=0 |
| Changes the class that performs the projections. | |
| 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 combination. | |
| 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 combination. | |
| 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 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 | |
A generic interface to combine and project efficiently MultiDim tables.
Definition at line 69 of file multiDimCombineAndProject.h.
| using gum::MultiDimCombineAndProject< TABLE >::value_type = typename TableType< TABLE >::value_type |
the type of the values contained into TABLE
Definition at line 85 of file multiDimCombineAndProject.h.
|
explicit |
default constructor
Referenced by MultiDimCombineAndProject(), clone(), gum::MultiDimCombineAndProjectDefault< TABLE >::operations(), and operator=().
| gum::MultiDimCombineAndProject< TABLE >::MultiDimCombineAndProject | ( | const MultiDimCombineAndProject< TABLE > & | ) |
|
virtual |
destructor
|
pure virtual |
virtual constructor
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
References MultiDimCombineAndProject().
|
pure virtual |
creates and returns the result of the projection over the variables not in del_vars of the combination of the tables within set
| InvalidArgumentsNumber | exception is thrown if the set passed in argument contains less than two elements |
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
pure virtual |
returns the memory consumption used during the combinations and projections
Actually, this function does not return a precise account of the memory used by the MultiDimCombineAndProject but a rough estimate based on the size of the tables involved in the combinations and projections.
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
pure virtual |
returns the memory consumption used during the combinations and projections
Actually, this function does not return a precise account of the memory used by the MultiDimCombineAndProject but a rough estimate based on the size of the tables involved in the combinations and projections.
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
pure virtual |
returns a rough estimate of the number of operations that will be performed to compute the combination.
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
pure virtual |
returns a rough estimate of the number of operations that will be performed to compute the combination.
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
pure virtual |
returns the set of operations to perform to make all the combinations and projections
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
pure virtual |
returns the current combination function
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
private |
forbid copy operators
References MultiDimCombineAndProject().
| Set< const IScheduleMultiDim * > gum::MultiDimCombineAndProject< TABLE >::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
References schedule().
Referenced by gum::MultiDimCombineAndProjectDefault< TABLE >::operations(), and schedule().
|
pure virtual |
f
changes the class that performs the combinations
Combinations are performed by pair, the CombineFunction being the function used to combine 2 tables, thus producing a new one. Of course, when we have to combine, say T1 * T2 * T3 * T4, there are several ways to do this computation. For instance, we might first compute T1 * T2, then T3 * T4, and finally compute the product of the resulting two tables. Or we might compute T1 * T2, then combine the result with T3, and then combine the last result with T4. The CombinationClass is responsible for determining which of these possibilities will actually be used. Function setCombinationClass allows to change the combinationClass and, thus, the way all those tables will be combined.
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
pure virtual |
changes the function used for combining two TABLES
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
pure virtual |
Changes the class that performs the projections.
As for the combination class, it is possible to change the projection class, thus defining a new projection behaviour.
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
pure virtual |
changes the function used for projecting TABLES
Implemented in gum::MultiDimCombineAndProjectDefault< TABLE >.
|
inline |
returns the current combination function
Definition at line 171 of file multiDimCombineAndProject.h.
|
inline |
returns the current projection function
Definition at line 177 of file multiDimCombineAndProject.h.