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

A generic class to instantiate a subset of variables of a multidimensional table. More...

#include <multiDimPartialInstantiation.h>

Public Member Functions

Constructors, Destructors and Copy
 MultiDimPartialInstantiation ()
 Default constructor. More...
 
 MultiDimPartialInstantiation (const MultiDimPartialInstantiation< GUM_SCALAR, TABLE > &src)
 Copy constructor. More...
 
virtual ~MultiDimPartialInstantiation ()
 Class destructor. More...
 
MultiDimPartialInstantiation< GUM_SCALAR, TABLE > & operator= (const MultiDimPartialInstantiation< GUM_SCALAR, TABLE > &src)
 Copy operator. More...
 
inherited methdods
virtual MultiDimPartialInstantiation< GUM_SCALAR, TABLE > * newFactory () const
 
Accessors/Modifiers
TABLE< GUM_SCALAR > * instantiate (const TABLE< GUM_SCALAR > &table, const HashTable< const DiscreteVariable *, Idx > &inst_vars)
 Creates and returns the partial instantiation of the table over a subset of its variables. More...
 
void instantiate (TABLE< GUM_SCALAR > &container, const TABLE< GUM_SCALAR > &table, const HashTable< const DiscreteVariable *, Idx > &inst_vars)
 Creates and returns the partial instantiation of the table over a subset of its variables. More...
 

Detailed Description

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

A generic class to instantiate a subset of variables of a multidimensional table.

Warning
Doxygen does not like spanning command on multiple line, so we could not configure it with the correct include directive. Use the following code snippet to include this file.
Template Parameters
GUM_SCALARThe type of scalars stored in this multidimensional table.
TableThe class of multidimensional table to use.

Definition at line 59 of file multiDimPartialInstantiation.h.

Constructor & Destructor Documentation

◆ MultiDimPartialInstantiation() [1/2]

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

Default constructor.

◆ MultiDimPartialInstantiation() [2/2]

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

Copy constructor.

Parameters
srcThe MultiDimPartialInstantiation to copy.

◆ ~MultiDimPartialInstantiation()

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

Class destructor.

Member Function Documentation

◆ instantiate() [1/2]

template<typename GUM_SCALAR , template< typename > class TABLE>
TABLE< GUM_SCALAR >* gum::MultiDimPartialInstantiation< GUM_SCALAR, TABLE >::instantiate ( const TABLE< GUM_SCALAR > &  table,
const HashTable< const DiscreteVariable *, Idx > &  inst_vars 
)

Creates and returns the partial instantiation of the table over a subset of its variables.

Warning
If inst_vars is precisely equal to the variables of table, the result is an empty table.
Parameters
tableThe table to parially instantiate.
inst_varsA mapping between variables and their instantiation.
Returns
A new freshly created TABLE which is the result of the instantiation of a subset of the variables of the TABLE passed in argument.

◆ instantiate() [2/2]

template<typename GUM_SCALAR , template< typename > class TABLE>
void gum::MultiDimPartialInstantiation< GUM_SCALAR, TABLE >::instantiate ( TABLE< GUM_SCALAR > &  container,
const TABLE< GUM_SCALAR > &  table,
const HashTable< const DiscreteVariable *, Idx > &  inst_vars 
)

Creates and returns the partial instantiation of the table over a subset of its variables.

Warning
If inst_vars is precisely equal to the variables of table, the result is an empty table.
Parameters
containerPlaceholder of the instantiation of table given inst_vars.
tableThe table to parially instantiate.
inst_varsA mapping between variables and their instantiation.

◆ newFactory()

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

◆ operator=()

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

Copy operator.

Parameters
srcThe MultiDimPartialInstantiation to copy.
Returns
Returns this MultiDimPartialInstantiation.

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