![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
a MultiDimImplementation Wrapper used for scheduling inferences More...
#include <scheduleMultiDim.h>
Public Member Functions | |
Constructors / Destructors | |
ScheduleMultiDim (const MultiDimImplementation< GUM_SCALAR > &) | |
constructs a ScheduleMultiDim containing an already built implementation More... | |
ScheduleMultiDim (const MultiDimDecorator< GUM_SCALAR > &) | |
constructs a ScheduleMultiDim containing an already built implementation More... | |
ScheduleMultiDim (const Sequence< const DiscreteVariable * > &vars) | |
construct a ScheduleMultiDim for an implementation yet to be built More... | |
ScheduleMultiDim (const ScheduleMultiDim< GUM_SCALAR > &) | |
copy constructor More... | |
~ScheduleMultiDim () | |
destructor More... | |
Operators | |
ScheduleMultiDim< GUM_SCALAR > & | operator= (const ScheduleMultiDim< GUM_SCALAR > &) |
copy operator More... | |
bool | operator== (const ScheduleMultiDim< GUM_SCALAR > &) const |
checks whether two ScheduleMultiDim are related to the same table More... | |
bool | operator!= (const ScheduleMultiDim< GUM_SCALAR > &) const |
checks whether two ScheduleMultiDim are related to different tables More... | |
Accessors/Modifiers | |
bool | isAbstract () const |
returns whether the ScheduleMultiDim contains a real multiDimImplementation More... | |
const MultiDimImplementation< GUM_SCALAR > & | multiDim () const |
returns the multiDimImplementation actually contained in the ScheduleMultiDim More... | |
Idx | id () const |
returns the id of the ScheduleMultiDim More... | |
const Sequence< const DiscreteVariable *> & | variablesSequence () const |
returns the set of variables involved in the multidim More... | |
Size | domainSize () const |
returns the domain size of the multidim More... | |
void | setMultiDim (const MultiDimImplementation< GUM_SCALAR > &) |
sets a new multiDimImplementation inside the wrapper More... | |
void | setMultiDim (const MultiDimDecorator< GUM_SCALAR > &) |
sets a new multiDimDecorator inside the wrapper More... | |
std::string | toString () const |
displays the content of the multidim More... | |
Friends | |
class | ScheduleDeleteMultiDim< GUM_SCALAR > |
grant accesses to ScheduleDeleteMultiDim More... | |
a MultiDimImplementation Wrapper used for scheduling inferences
A ScheduleMultiDim is a wrapper that contains either a "real" multidim table or an Id that indicates that the multidim table that should be contained has not been computed yet (by the scheduler). This Id enables the scheduler to know which is the operation the result of which will be the multidim table that will eventually be contained in the ScheduleMultiDim. Here is a brief piece of code that should highlight the concept:
So, to summarize the key idea underlying Schedule* classes: these classes encapsulate operations to perform and multidim tables that should be passed as argument to these operations. But nothing is actually computed until the execute() methods of the scheduled operations are executed.
Definition at line 106 of file scheduleMultiDim.h.
|
explicit |
constructs a ScheduleMultiDim containing an already built implementation
|
explicit |
constructs a ScheduleMultiDim containing an already built implementation
|
explicit |
construct a ScheduleMultiDim for an implementation yet to be built
The ScheduleMultiDim created is abstract, i.e., it does not contain a proper MultiDimImplementation yet. However, the variables of the latter need be known to optimize inference processes
gum::ScheduleMultiDim< GUM_SCALAR >::ScheduleMultiDim | ( | const ScheduleMultiDim< GUM_SCALAR > & | ) |
copy constructor
gum::ScheduleMultiDim< GUM_SCALAR >::~ScheduleMultiDim | ( | ) |
destructor
|
staticprivate |
returns a mapping from id to multidimImplementations
|
staticprivate |
returns a table indicating how many ScheduleMultiDim have the same id
|
staticprivate |
returns a table with the domain size of the table corresponding to id
|
staticprivate |
returns a table with the variables of the table corresponding to id
|
staticprivate |
returns the id corresponding to a given multidim
useful to assign the same id every time a given MultiDimImplementation is wrapped into a ScheduleMultiDim
|
staticprivate |
returns a new distinct ID for each abtract scheduleMultiDim
Size gum::ScheduleMultiDim< GUM_SCALAR >::domainSize | ( | ) | const |
returns the domain size of the multidim
Idx gum::ScheduleMultiDim< GUM_SCALAR >::id | ( | ) | const |
returns the id of the ScheduleMultiDim
bool gum::ScheduleMultiDim< GUM_SCALAR >::isAbstract | ( | ) | const |
returns whether the ScheduleMultiDim contains a real multiDimImplementation
const MultiDimImplementation< GUM_SCALAR >& gum::ScheduleMultiDim< GUM_SCALAR >::multiDim | ( | ) | const |
returns the multiDimImplementation actually contained in the ScheduleMultiDim
NotFound | exception is thrown if the multidimImplementation does not exist yet (because it has not been computed yet) |
bool gum::ScheduleMultiDim< GUM_SCALAR >::operator!= | ( | const ScheduleMultiDim< GUM_SCALAR > & | ) | const |
checks whether two ScheduleMultiDim are related to different tables
ScheduleMultiDim< GUM_SCALAR >& gum::ScheduleMultiDim< GUM_SCALAR >::operator= | ( | const ScheduleMultiDim< GUM_SCALAR > & | ) |
copy operator
bool gum::ScheduleMultiDim< GUM_SCALAR >::operator== | ( | const ScheduleMultiDim< GUM_SCALAR > & | ) | const |
checks whether two ScheduleMultiDim are related to the same table
void gum::ScheduleMultiDim< GUM_SCALAR >::setMultiDim | ( | const MultiDimImplementation< GUM_SCALAR > & | ) |
sets a new multiDimImplementation inside the wrapper
DuplicateElement | exception is thrown if the MultiDimImplementation has already been wrapped in a ScheduleMultiDim with another id |
void gum::ScheduleMultiDim< GUM_SCALAR >::setMultiDim | ( | const MultiDimDecorator< GUM_SCALAR > & | ) |
sets a new multiDimDecorator inside the wrapper
DuplicateElement | exception is thrown if the MultiDimDecorator has already been wrapped in a ScheduleMultiDim with another id |
std::string gum::ScheduleMultiDim< GUM_SCALAR >::toString | ( | ) | const |
displays the content of the multidim
const Sequence< const DiscreteVariable* >& gum::ScheduleMultiDim< GUM_SCALAR >::variablesSequence | ( | ) | const |
returns the set of variables involved in the multidim
|
friend |
grant accesses to ScheduleDeleteMultiDim
Definition at line 201 of file scheduleMultiDim.h.
|
private |
the unique Id of the ScheduleMultiDim
Definition at line 204 of file scheduleMultiDim.h.