![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
An efficient class for combining and projecting MultiDim tables. More...
#include <agrum/tools/multidim/operators/multiDimCombineAndProjectDefault.h>
Public Member Functions | |
Constructors / Destructors | |
MultiDimCombineAndProjectDefault (TABLE< GUM_SCALAR > *(*combine)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &), TABLE< GUM_SCALAR > *(*project)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable * > &)) | |
Default constructor. More... | |
MultiDimCombineAndProjectDefault (const MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE > &) | |
Copy constructor. More... | |
virtual | ~MultiDimCombineAndProjectDefault () |
Destructor. More... | |
virtual MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE > * | newFactory () const |
virtual constructor More... | |
Accessors/Modifiers | |
virtual Set< const TABLE< GUM_SCALAR > *> | combineAndProject (Set< const TABLE< GUM_SCALAR > * > set, Set< const DiscreteVariable * > del_vars) |
creates and returns the result of the projection over the variables not in del_vars of the combination of the tables within set More... | |
virtual void | setCombineFunction (TABLE< GUM_SCALAR > *(*combine)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &)) |
changes the function used for combining two TABLES More... | |
virtual void | setCombinationClass (const MultiDimCombination< GUM_SCALAR, TABLE > &comb_class) |
changes the class that performs the combinations More... | |
virtual TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &) | combineFunction () |
Returns the current combination function. More... | |
virtual void | setProjectFunction (TABLE< GUM_SCALAR > *(*proj)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable * > &)) |
Changes the function used for projecting TABLES. More... | |
virtual void | setProjectionClass (const MultiDimProjection< GUM_SCALAR, TABLE > &proj_class) |
Changes the class that performs the projections. More... | |
virtual TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable *> &) | projectFunction () |
returns the current projection function More... | |
virtual float | nbOperations (const Set< const TABLE< GUM_SCALAR > * > &set, const Set< const DiscreteVariable * > &del_vars) const |
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, Set< const DiscreteVariable * > del_vars) const |
returns a rough estimate of the number of operations that will be performed to compute the combination. More... | |
virtual std::pair< long, long > | memoryUsage (const Set< const TABLE< GUM_SCALAR > * > &set, const Set< const DiscreteVariable * > &del_vars) const |
returns the memory consumption used during the combinations and projections More... | |
virtual std::pair< long, long > | memoryUsage (const Set< const Sequence< const DiscreteVariable * > * > &set, Set< const DiscreteVariable * > del_vars) const |
returns the memory consumption used during the combinations and projections More... | |
An efficient class for combining and projecting MultiDim tables.
Definition at line 47 of file multiDimCombineAndProjectDefault.h.
gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >::MultiDimCombineAndProjectDefault | ( | TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &) | combine, |
TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable * > &) | project | ||
) |
Default constructor.
gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >::MultiDimCombineAndProjectDefault | ( | const MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE > & | ) |
Copy constructor.
|
virtual |
Destructor.
|
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. |
Implements gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >.
|
virtual |
Returns the current combination function.
Reimplemented from gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >.
|
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.
|
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.
Implements gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >.
|
virtual |
returns a rough estimate of the number of operations that will be performed to compute the combination.
Implements gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >.
|
virtual |
returns a rough estimate of the number of operations that will be performed to compute the combination.
|
virtual |
virtual constructor
Implements gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >.
|
virtual |
returns the current projection function
Reimplemented from gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >.
|
virtual |
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.
|
virtual |
changes the function used for combining two TABLES
Implements gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >.
|
virtual |
Changes the function used for projecting TABLES.
Implements gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >.
|
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.
|
private |
the class used for the combinations
Definition at line 187 of file multiDimCombineAndProjectDefault.h.
|
private |
the class used for the projections
Definition at line 190 of file multiDimCombineAndProjectDefault.h.