![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
Class for storing multidimensional tables into containers (sets, etc.). More...
#include <scheduleStorage.h>
Public Types | |
| using | SCHED_TABLE = typename std::remove_pointer< TABLE >::type |
Public Member Functions | |
Constructors / Destructors | |
| ScheduleStorage (const IScheduleMultiDim &table, CONTAINER< TABLE > &container) | |
| default constructor | |
| ScheduleStorage (const ScheduleStorage< TABLE, CONTAINER > &from) | |
| copy constructor | |
| ScheduleStorage (ScheduleStorage< TABLE, CONTAINER > &&from) | |
| move constructor | |
| ScheduleStorage< TABLE, CONTAINER > * | clone () const final |
| virtual copy constructor | |
| virtual | ~ScheduleStorage () |
| destructor | |
Operators | |
| ScheduleStorage< TABLE, CONTAINER > & | operator= (const ScheduleStorage< TABLE, CONTAINER > &) |
| copy operator | |
| ScheduleStorage< TABLE, CONTAINER > & | operator= (ScheduleStorage< TABLE, CONTAINER > &&) |
| move operator | |
| bool | operator== (const ScheduleOperator &) const final |
| operator == | |
| bool | operator!= (const ScheduleOperator &) const final |
| operator != | |
| virtual bool | operator== (const ScheduleStorage< TABLE, CONTAINER > &) const |
| operator == | |
| virtual bool | operator!= (const ScheduleStorage< TABLE, CONTAINER > &) const |
| operator != | |
Accessors/Modifiers | |
| bool | hasSameArguments (const ScheduleOperator &) const final |
| checks whether two ScheduleStorage have the same parameters (same variables and same content, and same container) | |
| bool | hasSameArguments (const ScheduleStorage< TABLE, CONTAINER > &) const |
| checks whether two ScheduleDeletion have the same parameters (same variables and same content, and same container) | |
| bool | hasSimilarArguments (const ScheduleOperator &) const final |
| checks whether two ScheduleProjection have similar parameters (same variables but not necessarily the same content) | |
| bool | hasSimilarArguments (const ScheduleStorage< TABLE, CONTAINER > &) const |
| checks whether two ScheduleProjection have similar parameters (same variables but not necessarily the same content) | |
| bool | isSameOperator (const ScheduleOperator &) const final |
| checks whether two ScheduleOperator perform the same operation | |
| bool | isSameOperator (const ScheduleStorage< TABLE, CONTAINER > &) const |
| checks whether two ScheduleOperator perform the same operation | |
| const ScheduleMultiDim< SCHED_TABLE > & | arg () const |
| returns the argument of the storing function | |
| const Sequence< const IScheduleMultiDim * > & | args () const final |
| returns the sequence of arguments passed to the operator | |
| const Sequence< const IScheduleMultiDim * > & | results () const final |
| returns the sequence of ScheduleMultidim output by the operator | |
| void | execute () final |
| really executes the operator | |
| bool | isExecuted () const final |
| indicates whether the operator has been executed | |
| void | undo () final |
| undo a previous execution, if any | |
| void | updateArgs (const Sequence< const IScheduleMultiDim * > &new_args) final |
| modifies the arguments of the operator | |
| double | nbOperations () const final |
| returns an estimation of the number of elementary operations needed to perform the ScheduleOperator | |
| std::pair< double, double > | memoryUsage () const final |
| returns the memory consumption used during the execution of the operator | |
| std::string | toString () const final |
| displays the content of the operator | |
Accessors/Modifiers | |
| ScheduleOperatorType | type () const |
| returns the type of the operator | |
| bool | implyDeletion () const |
| indicates whether the operator deletes some of its arguments | |
| void | makeResultsPersistent (const bool is_persistent) |
| makes the results of the operator persistent or not | |
| bool | hasPersistentResults () const |
| shows whether the operator has persistent results | |
Private Attributes | |
| ScheduleMultiDim< SCHED_TABLE > * | _arg_ |
| the table to store | |
| Sequence< const IScheduleMultiDim * > | _args_ |
| the sequence of arguments passed to the operator | |
| Sequence< const IScheduleMultiDim * > | _results_ |
| the sequence of ScheduleMultidim output by the operator | |
| CONTAINER< TABLE > * | _container_ |
| the container into which the table is stored | |
| bool | _is_executed_ {false} |
| indicates whether the operator has been performed or not | |
| ScheduleOperatorType | _op_type_ |
| the name of the operator to perform | |
| bool | _imply_deletion_ |
| indicates whether the operator will delete some of the ScheduleMultiDim passed as its arguments | |
| bool | _result_persistent_ |
| is the result persistent | |
Class for storing multidimensional tables into containers (sets, etc.).
Definition at line 110 of file scheduleStorage.h.
| using gum::ScheduleStorage< TABLE, CONTAINER >::SCHED_TABLE = typename std::remove_pointer< TABLE >::type |
Definition at line 115 of file scheduleStorage.h.
|
explicit |
default constructor
| table | the ScheduleMultiDim containing the table that will eventually be stored. |
Referenced by ScheduleStorage(), ScheduleStorage(), ~ScheduleStorage(), clone(), hasSameArguments(), hasSimilarArguments(), isSameOperator(), operator!=(), operator=(), operator=(), and operator==().
| gum::ScheduleStorage< TABLE, CONTAINER >::ScheduleStorage | ( | const ScheduleStorage< TABLE, CONTAINER > & | from | ) |
| gum::ScheduleStorage< TABLE, CONTAINER >::ScheduleStorage | ( | ScheduleStorage< TABLE, CONTAINER > && | from | ) |
|
virtual |
| const ScheduleMultiDim< SCHED_TABLE > & gum::ScheduleStorage< TABLE, CONTAINER >::arg | ( | ) | const |
|
finalvirtual |
returns the sequence of arguments passed to the operator
Implements gum::ScheduleOperator.
References args().
Referenced by args().
|
finalvirtual |
virtual copy constructor
Implements gum::ScheduleOperator.
References ScheduleStorage().
|
finalvirtual |
really executes the operator
Implements gum::ScheduleOperator.
References execute().
Referenced by execute().
|
inherited |
shows whether the operator has persistent results
|
finalvirtual |
checks whether two ScheduleStorage have the same parameters (same variables and same content, and same container)
ScheduleMultiDim Parameters having the same variables and the same content are essentially identical but they may have different Ids (so that they may not be ==).
Implements gum::ScheduleOperator.
References gum::ScheduleOperator::ScheduleOperator(), and hasSameArguments().
Referenced by hasSameArguments(), and hasSameArguments().
| bool gum::ScheduleStorage< TABLE, CONTAINER >::hasSameArguments | ( | const ScheduleStorage< TABLE, CONTAINER > & | ) | const |
checks whether two ScheduleDeletion have the same parameters (same variables and same content, and same container)
ScheduleMultiDim Parameters having the same variables and the same content are essentially identical but they may have different Ids (so that they may not be ==).
References ScheduleStorage(), and hasSameArguments().
|
finalvirtual |
checks whether two ScheduleProjection have similar parameters (same variables but not necessarily the same content)
Implements gum::ScheduleOperator.
References gum::ScheduleOperator::ScheduleOperator(), and hasSimilarArguments().
Referenced by hasSimilarArguments(), and hasSimilarArguments().
| bool gum::ScheduleStorage< TABLE, CONTAINER >::hasSimilarArguments | ( | const ScheduleStorage< TABLE, CONTAINER > & | ) | const |
checks whether two ScheduleProjection have similar parameters (same variables but not necessarily the same content)
References ScheduleStorage(), and hasSimilarArguments().
|
inherited |
indicates whether the operator deletes some of its arguments
|
finalvirtual |
indicates whether the operator has been executed
Implements gum::ScheduleOperator.
References isExecuted().
Referenced by isExecuted().
|
finalvirtual |
checks whether two ScheduleOperator perform the same operation
Reimplemented from gum::ScheduleOperator.
References gum::ScheduleOperator::ScheduleOperator(), and isSameOperator().
Referenced by isSameOperator(), and isSameOperator().
| bool gum::ScheduleStorage< TABLE, CONTAINER >::isSameOperator | ( | const ScheduleStorage< TABLE, CONTAINER > & | ) | const |
checks whether two ScheduleOperator perform the same operation
References ScheduleStorage(), and isSameOperator().
|
inherited |
makes the results of the operator persistent or not
Unlike non-persistent results, a persistent one is not destroyed when the operator itself is destroyed
|
finalvirtual |
returns the memory consumption used during the execution of the operator
Actually, this function does not return a precise account of the memory used by the ScheduleOperator but a rough estimate based on the sizes of the tables involved in the operator.
Implements gum::ScheduleOperator.
References memoryUsage().
Referenced by memoryUsage().
|
finalvirtual |
returns an estimation of the number of elementary operations needed to perform the ScheduleOperator
Implements gum::ScheduleOperator.
References nbOperations().
Referenced by nbOperations().
|
finalvirtual |
operator !=
Two ScheduleStorage are identical if and only if they have equal (==) ScheduleMultiDim arguments and the same containers to store their tables into. By Equal arguments, we stress that we mean that these ScheduleMultiDims have the same IDs
Reimplemented from gum::ScheduleOperator.
References gum::ScheduleOperator::ScheduleOperator().
|
virtual |
operator !=
Two ScheduleStorage are identical if and only if they have equal (==) ScheduleMultiDim arguments and the same containers to store their tables into. By Equal arguments, we stress that we mean that these ScheduleMultiDims have the same IDs
References ScheduleStorage().
| ScheduleStorage< TABLE, CONTAINER > & gum::ScheduleStorage< TABLE, CONTAINER >::operator= | ( | const ScheduleStorage< TABLE, CONTAINER > & | ) |
| ScheduleStorage< TABLE, CONTAINER > & gum::ScheduleStorage< TABLE, CONTAINER >::operator= | ( | ScheduleStorage< TABLE, CONTAINER > && | ) |
|
finalvirtual |
operator ==
Two ScheduleStorage are identical if and only if they have equal (==) ScheduleMultiDim arguments and the same containers to store their tables into. By Equal arguments, we stress that we mean that these ScheduleMultiDims have the same IDs
Reimplemented from gum::ScheduleOperator.
References gum::ScheduleOperator::ScheduleOperator().
|
virtual |
operator ==
Two ScheduleStorage are identical if and only if they have equal (==) ScheduleMultiDim arguments and the same containers to store their tables into. By Equal arguments, we stress that we mean that these ScheduleMultiDims have the same IDs
References ScheduleStorage().
|
finalvirtual |
returns the sequence of ScheduleMultidim output by the operator
Implements gum::ScheduleOperator.
References results().
Referenced by results().
|
finalvirtual |
displays the content of the operator
Implements gum::ScheduleOperator.
References toString().
Referenced by toString().
|
inherited |
returns the type of the operator
Referenced by ScheduleOperator().
|
finalvirtual |
undo a previous execution, if any
throws OperationNotAllowed is raised if the operator is unable to perform undo
Implements gum::ScheduleOperator.
References undo().
Referenced by undo().
|
finalvirtual |
modifies the arguments of the operator
| SizeError | is raised if the number of elements in new_args does not correspond to the number of arguments expected by the ScheduleOperator. |
| TypeError | is raised if at least one element of new_args does not have a type compatible with what the ScheduleOperator expects. |
Implements gum::ScheduleOperator.
References updateArgs().
Referenced by updateArgs().
|
private |
the table to store
Definition at line 281 of file scheduleStorage.h.
|
private |
the sequence of arguments passed to the operator
This method is convenient when using ScheduleOperator rather than directly using ScheduleBinaryCombination
Definition at line 286 of file scheduleStorage.h.
|
private |
the container into which the table is stored
Definition at line 296 of file scheduleStorage.h.
|
privateinherited |
indicates whether the operator will delete some of the ScheduleMultiDim passed as its arguments
Definition at line 246 of file scheduleOperator.h.
|
private |
indicates whether the operator has been performed or not
Definition at line 299 of file scheduleStorage.h.
|
privateinherited |
the name of the operator to perform
Definition at line 242 of file scheduleOperator.h.
|
privateinherited |
is the result persistent
Definition at line 249 of file scheduleOperator.h.
|
private |
the sequence of ScheduleMultidim output by the operator
Definition at line 293 of file scheduleStorage.h.