aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE > Class Template Referenceabstract

A generic interface to combine and project efficiently MultiDim tables. More...

#include <agrum/tools/multidim/operators/multiDimCombineAndProject.h>

+ Inheritance diagram for gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >:

Public Member Functions

Constructors / Destructors
 MultiDimCombineAndProject ()
 default constructor More...
 
 MultiDimCombineAndProject (const MultiDimCombineAndProject< GUM_SCALAR, TABLE > &)
 copy constructor More...
 
virtual ~MultiDimCombineAndProject ()
 destructor More...
 
virtual MultiDimCombineAndProject< GUM_SCALAR, TABLE > * newFactory () const =0
 virtual constructor More...
 
Accessors/Modifiers
virtual Set< const TABLE< GUM_SCALAR > *> combineAndProject (Set< const TABLE< GUM_SCALAR > * > set, Set< const DiscreteVariable * > 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 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 current combination function More...
 
virtual void setProjectFunction (TABLE< GUM_SCALAR > *(*proj)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))=0
 changes the function used for projecting TABLES 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 =0
 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 Sequence< const DiscreteVariable * > * > &set, Set< const DiscreteVariable * > del_vars) const =0
 creates and returns the result of the projection over the variables not in del_vars of the combination of the tables within set More...
 

Detailed Description

template<typename GUM_SCALAR, template< typename > class TABLE>
class gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >

A generic interface to combine and project efficiently MultiDim tables.

Definition at line 49 of file multiDimCombineAndProject.h.

Constructor & Destructor Documentation

◆ MultiDimCombineAndProject() [1/2]

template<typename GUM_SCALAR , template< typename > class TABLE>
gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::MultiDimCombineAndProject ( )

default constructor

◆ MultiDimCombineAndProject() [2/2]

template<typename GUM_SCALAR , template< typename > class TABLE>
gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::MultiDimCombineAndProject ( const MultiDimCombineAndProject< GUM_SCALAR, TABLE > &  )

copy constructor

◆ ~MultiDimCombineAndProject()

template<typename GUM_SCALAR , template< typename > class TABLE>
virtual gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::~MultiDimCombineAndProject ( )
virtual

destructor

Member Function Documentation

◆ combineAndProject()

template<typename GUM_SCALAR , template< typename > class TABLE>
virtual Set< const TABLE< GUM_SCALAR >* > gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::combineAndProject ( Set< const TABLE< GUM_SCALAR > * >  set,
Set< const DiscreteVariable * >  del_vars 
)
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

Returns
a new freshly created TABLE which is the result of the projection of the combination of all the TABLES passed in argument
Exceptions
InvalidArgumentsNumberexception is thrown if the set passed in argument contains less than two elements

Implemented in gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >.

◆ combineFunction()

template<typename GUM_SCALAR , template< typename > class TABLE>
virtual TABLE< GUM_SCALAR >*(*)(const TABLE< GUM_SCALAR >&, const TABLE< GUM_SCALAR >&) gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::combineFunction ( )
virtual

returns the current combination function

Reimplemented in gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >.

◆ memoryUsage()

template<typename GUM_SCALAR , template< typename > class TABLE>
virtual std::pair< long, long > gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::memoryUsage ( const Set< const Sequence< const DiscreteVariable * > * > &  set,
Set< const DiscreteVariable * >  del_vars 
) const
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

Returns
a new freshly created TABLE which is the result of the projection of the combination of all the TABLES passed in argument
Exceptions
InvalidArgumentsNumberexception is thrown if the set passed in argument contains less than two elements

Implemented in gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >.

◆ nbOperations()

template<typename GUM_SCALAR , template< typename > class TABLE>
virtual float gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::nbOperations ( const Set< const TABLE< GUM_SCALAR > * > &  set,
const Set< const DiscreteVariable * > &  del_vars 
) const
pure virtual

returns a rough estimate of the number of operations that will be performed to compute the combination.

Implemented in gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >.

◆ newFactory()

template<typename GUM_SCALAR , template< typename > class TABLE>
virtual MultiDimCombineAndProject< GUM_SCALAR, TABLE >* gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::newFactory ( ) const
pure virtual

virtual constructor

Returns
a new fresh MultiDimCombineAndProject with the same combination and projection functions.

Implemented in gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >.

◆ operator=()

template<typename GUM_SCALAR , template< typename > class TABLE>
MultiDimCombineAndProject< GUM_SCALAR, TABLE >& gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::operator= ( const MultiDimCombineAndProject< GUM_SCALAR, TABLE > &  )
private

forbid copy operators

◆ projectFunction()

template<typename GUM_SCALAR , template< typename > class TABLE>
virtual TABLE< GUM_SCALAR >*(*)(const TABLE< GUM_SCALAR >&, const Set< const DiscreteVariable* >&) gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::projectFunction ( )
virtual

returns the current projection function

Reimplemented in gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >.

◆ setCombineFunction()

template<typename GUM_SCALAR , template< typename > class TABLE>
virtual void gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::setCombineFunction ( TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const TABLE< GUM_SCALAR > &)  combine)
pure virtual

changes the function used for combining two TABLES

Implemented in gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >.

◆ setProjectFunction()

template<typename GUM_SCALAR , template< typename > class TABLE>
virtual void gum::MultiDimCombineAndProject< GUM_SCALAR, TABLE >::setProjectFunction ( TABLE< GUM_SCALAR > *(*)(const TABLE< GUM_SCALAR > &, const Set< const DiscreteVariable * > &)  proj)
pure virtual

changes the function used for projecting TABLES

Implemented in gum::MultiDimCombineAndProjectDefault< GUM_SCALAR, TABLE >.


The documentation for this class was generated from the following file: