![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
A generic interface to combine efficiently several MultiDim tables. More...
#include <agrum/tools/multidim/multiDimCombination.h>
Public Member Functions | |
Constructors / Destructors | |
MultiDimCombination () | |
default constructor More... | |
MultiDimCombination (const MultiDimCombination< GUM_SCALAR, TABLE > &) | |
copy constructor More... | |
virtual | ~MultiDimCombination () |
destructor More... | |
virtual MultiDimCombination< GUM_SCALAR, TABLE > * | newFactory () const =0 |
virtual constructor More... | |
Accessors/Modifiers | |
virtual TABLE< GUM_SCALAR > * | combine (const Set< const TABLE< GUM_SCALAR > * > &set)=0 |
creates and returns the result of the combination of the tables within set More... | |
virtual void | combine (TABLE< GUM_SCALAR > &container, const Set< const TABLE< GUM_SCALAR > * > &set)=0 |
creates and returns the result of the combination of the tables within set More... | |
virtual void | setCombineFunction (TABLE< GUM_SCALAR > *(*combine)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &))=0 |
changes the function used for combining two TABLES More... | |
virtual TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &) | combineFunction () |
returns the combination function currently used by the combinator More... | |
virtual float | nbOperations (const Set< const TABLE< GUM_SCALAR > * > &set) const =0 |
returns a rough estimate of the number of operations that will be performed to compute the combination. More... | |
virtual float | nbOperations (const Set< const Sequence< const DiscreteVariable * > * > &set) const =0 |
creates and returns the result of the combination of the tables within set More... | |
virtual std::pair< long, long > | memoryUsage (const Set< const TABLE< GUM_SCALAR > * > &set) const =0 |
Returns the memory consumption used during the combination. More... | |
virtual std::pair< long, long > | memoryUsage (const Set< const Sequence< const DiscreteVariable * > * > &set) const =0 |
creates and returns the result of the combination of the tables within set More... | |
MultiDimCombination< GUM_SCALAR, TABLE > & | operator= (const MultiDimCombination< GUM_SCALAR, TABLE > &) |
forbid copy operators More... | |
A generic interface to combine efficiently several MultiDim tables.
MultiDimCombination is a generic interface designed to combine efficiently several multidimensional objects, that is, to compute expressions like T1 op T2 op T3 op .... op Tn, where the Ti's are the multidimensional objects and op is an operator or a function taking in argument two such objects and producing a new (combined) Ti object. By default, the combination operation "op" is assumed to be COMMUTATIVE and ASSOCIATIVE.
By multidimensional objects, we mean of course MultiDimImplementations, but also more complex objects such as, for instance, pairs of MultiDimImplementation the first one of which being a utility function and the second one being a table of instantiations (useful, e.g., for computing MPE's) but this can also be a pair (Utility,Potential) for the inference in an Influence Diagram. Actually, the important point for a multidimensional object to be eligible to be combined by the MultiDimCombination is:
multidimensional objects and producing a new object of the same type, which is the so-called combined result of these two objects.
To be quite generic, the MultiDimCombination takes in argument the function that produces the result of the combination of two multidimensional objects. The following code gives an example of the usage of MultiDimCombinations:
Definition at line 96 of file multiDimCombination.h.
gum::MultiDimCombination< GUM_SCALAR, TABLE >::MultiDimCombination | ( | ) |
default constructor
gum::MultiDimCombination< GUM_SCALAR, TABLE >::MultiDimCombination | ( | const MultiDimCombination< GUM_SCALAR, TABLE > & | ) |
copy constructor
|
virtual |
destructor
|
pure virtual |
creates and returns the result 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::MultiDimCombinationDefault< GUM_SCALAR, TABLE >.
|
pure virtual |
creates and returns the result 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::MultiDimCombinationDefault< GUM_SCALAR, TABLE >.
|
virtual |
returns the combination function currently used by the combinator
Reimplemented in gum::MultiDimCombinationDefault< GUM_SCALAR, TABLE >.
|
pure virtual |
Returns the memory consumption used during the combination.
Actually, this function does not return a precise account of the memory used by the multidimCombination but a rough estimate based on the sizes of the tables involved in the combination.
Implemented in gum::MultiDimCombinationDefault< GUM_SCALAR, TABLE >.
|
pure virtual |
creates and returns the result 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::MultiDimCombinationDefault< GUM_SCALAR, TABLE >.
|
pure virtual |
returns a rough estimate of the number of operations that will be performed to compute the combination.
Implemented in gum::MultiDimCombinationDefault< GUM_SCALAR, TABLE >.
|
pure virtual |
creates and returns the result 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::MultiDimCombinationDefault< GUM_SCALAR, TABLE >.
|
pure virtual |
virtual constructor
Implemented in gum::MultiDimCombinationDefault< GUM_SCALAR, TABLE >.
|
private |
forbid copy operators
|
pure virtual |
changes the function used for combining two TABLES
Implemented in gum::MultiDimCombinationDefault< GUM_SCALAR, TABLE >.