![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
The Table-agnostic base class of scheduleMultiDim. More...
#include <agrum/base/graphicalModels/inference/scheduler/IScheduleMultiDim.h>
Public Member Functions | |
Constructors / Destructors | |
| IScheduleMultiDim (const Idx id=0) | |
| constructs a IScheduleMultiDim | |
| virtual IScheduleMultiDim * | clone () const =0 |
| virtual copy constructor | |
| virtual IScheduleMultiDim * | clone (bool force_copy) const =0 |
| virtual copy constructor enabling to force a copy of the content | |
| virtual | ~IScheduleMultiDim () |
| destructor | |
Operators | |
| virtual bool | operator== (const IScheduleMultiDim &) const |
| checks whether two IScheduleMultiDim have exactly the same ID | |
| virtual bool | operator!= (const IScheduleMultiDim &) const |
| checks whether two IScheduleMultiDim have different IDs | |
Protected Member Functions | |
| IScheduleMultiDim & | operator= (const IScheduleMultiDim &from) |
| copy operator | |
| IScheduleMultiDim & | operator= (IScheduleMultiDim &&from) |
| move operator | |
| IScheduleMultiDim (const IScheduleMultiDim &from) | |
| copy constructor | |
| IScheduleMultiDim (IScheduleMultiDim &&from) | |
| move constructor | |
Protected Attributes | |
| Idx | id_ |
| the unique Id of the ScheduleMultiDim | |
Static Private Member Functions | |
| static Idx | _newId_ () |
| returns a new distinct ID for each abstract scheduleMultiDim | |
Static Private Attributes | |
| static std::atomic< Idx > | _multidim_id_ |
Accessors/Modifiers | |
| virtual bool | hasSameVariables (const IScheduleMultiDim &m) const =0 |
| checks whether two IScheduleMultiDim have the same variables | |
| virtual bool | hasSameContent (const IScheduleMultiDim &) const =0 |
| checks whether two IScheduleMultiDim contain precisely the same table | |
| virtual bool | isAbstract () const =0 |
| returns whether the ScheduleMultiDim contains a real table or not | |
| virtual bool | containsMultiDim () const =0 |
| indicates whether the ScheduleMultiDim contains a table and possesses it | |
| virtual void | makeAbstract ()=0 |
| if the ScheduleMultiDim is not abstract, make it abstract again | |
| Idx | id () const |
| returns the id of the ScheduleMultiDim | |
| virtual const Sequence< const DiscreteVariable * > & | variablesSequence () const =0 |
| returns the set of variables involved in the ScheduleMultiDim | |
| virtual Size | domainSize () const =0 |
| returns the domain size the table would have after its creation | |
| virtual double | sizeOfContent () const =0 |
| returns the sizeof of the elements stored into the ScheduleMultiDim | |
| virtual std::string | toString () const =0 |
| displays the content of the ScheduleMultiDim | |
| static void | resetIdGenerator () |
| reset the id generator to 0 | |
The Table-agnostic base class of scheduleMultiDim.
Definition at line 67 of file IScheduleMultiDim.h.
|
explicit |
constructs a IScheduleMultiDim
| id | if specified and different from 0, the id of the constructed ScheduleMultiDim, else an Id is automatically provided to the ScheduleMultiDim. |
Referenced by IScheduleMultiDim(), IScheduleMultiDim(), clone(), clone(), hasSameContent(), gum::ScheduleMultiDim< TABLE >::hasSameContent(), hasSameVariables(), gum::ScheduleMultiDim< TABLE >::hasSameVariables(), operator!=(), gum::ScheduleMultiDim< TABLE >::operator!=(), operator=(), operator=(), operator==(), and gum::ScheduleMultiDim< TABLE >::operator==().
|
virtual |
destructor
|
protected |
|
protected |
|
staticprivate |
returns a new distinct ID for each abstract scheduleMultiDim
|
pure virtual |
virtual copy constructor
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
References IScheduleMultiDim().
|
pure virtual |
virtual copy constructor enabling to force a copy of the content
Implemented in gum::ScheduleMultiDim< TABLE >.
References IScheduleMultiDim().
|
pure virtual |
indicates whether the ScheduleMultiDim contains a table and possesses it
Non-abstract ScheduleMultiDim can either contain a multidimensional table or they can reference an external table. This method indicates whether we are in the first or the second case described above.
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
|
pure virtual |
returns the domain size the table would have after its creation
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
|
pure virtual |
checks whether two IScheduleMultiDim contain precisely the same table
By "contain precisely the same table", we mean that the actual tables pointed to by the IScheduleMultiDim are the same (i.e., either they are both not yet allocated but have the same sequences of variables or they have the same content)
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
References IScheduleMultiDim().
|
pure virtual |
checks whether two IScheduleMultiDim have the same variables
Method hasSameVariables tests whether two IScheduleMultiDim contain the same sequences of variables. It is weaker than operator== in the sense that we do not check for the IScheduleMultiDim's ID nor for the content of the table stored into the IScheduleMultiDim, if any.
| m | the IScheduleMultiDim with which we test similarity. |
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
References IScheduleMultiDim().
| Idx gum::IScheduleMultiDim::id | ( | ) | const |
returns the id of the ScheduleMultiDim
Each ScheduleMultiDim has an Id that enables to find it easily. This is especially useful when copying schedule trees.
|
pure virtual |
returns whether the ScheduleMultiDim contains a real table or not
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
|
pure virtual |
if the ScheduleMultiDim is not abstract, make it abstract again
When a ScheduleMultiDim contains a multidimensional table, making it abstract is equivalent to freeing the table from memory and saying that the ScheduleMultiDim contains a null pointer. If the ScheduleMultiDim contains only a reference on an external table, then this table is kept untouched, but the ScheduleMultiDim now points toward a null pointer. Of course, if the ScheduleMultiDim was already abstract, then nothing is executed.
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
|
virtual |
checks whether two IScheduleMultiDim have different IDs
Two IScheduleMultiDim having different IDs should mean that they either contain the different sequences of variables and/or different tables.
Reimplemented in gum::ScheduleMultiDim< TABLE >.
References IScheduleMultiDim().
|
protected |
|
protected |
|
virtual |
checks whether two IScheduleMultiDim have exactly the same ID
Two IScheduleMultiDim having the same ID should imply that they also contain the same sequences of variables and the same tables.
Reimplemented in gum::ScheduleMultiDim< TABLE >.
References IScheduleMultiDim().
|
static |
reset the id generator to 0
This method is essentially useful for performing aGrUM's testunits (depending on the order in which they are executed, the results could be difficult to predict without ensuring that, at the beginning of a testunit, the id of the first ScheduleMultiDim is always 1).
|
pure virtual |
returns the sizeof of the elements stored into the ScheduleMultiDim
This method is useful for determining schedules' memory usage: this is actually equal to the number of elements times the sizeof of these elements. The goal of sizeOfContent is to return this sizeof
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
|
pure virtual |
displays the content of the ScheduleMultiDim
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
|
pure virtual |
returns the set of variables involved in the ScheduleMultiDim
Implemented in gum::ScheduleMultiDim< TABLE >, gum::ScheduleMultiDim< SCHED_TABLE >, gum::ScheduleMultiDim< TABLE1 >, gum::ScheduleMultiDim< TABLE2 >, and gum::ScheduleMultiDim< TABLE_RES >.
|
staticprivate |
Definition at line 208 of file IScheduleMultiDim.h.
|
protected |
the unique Id of the ScheduleMultiDim
Definition at line 200 of file IScheduleMultiDim.h.