26 #ifndef DOXYGEN_SHOULD_SKIP_THIS 37 template <
typename GUM_SCALAR >
39 const ScheduleMultiDim< GUM_SCALAR >& table) :
40 ScheduleOperation< GUM_SCALAR >(
41 ScheduleOperation< GUM_SCALAR >::Type::DELETE_MULTIDIM),
42 __table(table), __args(0) {
48 template <
typename GUM_SCALAR >
50 const ScheduleDeleteMultiDim< GUM_SCALAR >& from) :
58 template <
typename GUM_SCALAR >
59 ScheduleDeleteMultiDim< GUM_SCALAR >*
61 return new ScheduleDeleteMultiDim< GUM_SCALAR >(*this);
65 template <
typename GUM_SCALAR >
74 template <
typename GUM_SCALAR >
76 operator=(
const ScheduleDeleteMultiDim< GUM_SCALAR >& from) {
92 template <
typename GUM_SCALAR >
94 operator==(
const ScheduleOperation< GUM_SCALAR >& op)
const {
95 if (this->
type() != op.type())
return false;
97 const ScheduleDeleteMultiDim< GUM_SCALAR >& real_op =
98 static_cast< const ScheduleDeleteMultiDim< GUM_SCALAR >&
>(op);
99 return __table == real_op.__table;
103 template <
typename GUM_SCALAR >
105 operator!=(
const ScheduleOperation< GUM_SCALAR >& op)
const {
106 if (this->
type() != op.type())
return true;
108 const ScheduleDeleteMultiDim< GUM_SCALAR >& real_op =
109 static_cast< const ScheduleDeleteMultiDim< GUM_SCALAR >&
>(op);
110 return __table != real_op.__table;
114 template <
typename GUM_SCALAR >
116 const MultiDimImplementation< GUM_SCALAR >& multidim =
__table.multiDim();
124 template <
typename GUM_SCALAR >
130 template <
typename GUM_SCALAR >
131 INLINE std::pair< long, long >
133 long size_table = long(
__table.domainSize());
135 if (size_table < 0) {
136 GUM_ERROR(OutOfBounds,
"memory usage out of long int range");
139 return std::pair< long, long >(-size_table, -size_table);
143 template <
typename GUM_SCALAR >
144 INLINE
const Sequence< const ScheduleMultiDim< GUM_SCALAR >* >&
147 __args =
new Sequence< const ScheduleMultiDim< GUM_SCALAR >* >;
155 template <
typename GUM_SCALAR >
156 INLINE
const Sequence< const ScheduleMultiDim< GUM_SCALAR >* >&
158 static Sequence< const ScheduleMultiDim< GUM_SCALAR >* > empty_seq;
159 # ifdef GUM_DEBUG_MODE 163 static bool first_time =
true;
167 __debug__::__inc_deletion(
168 "Sequence", __FILE__, __LINE__,
"destructor of", (
void*)&empty_seq);
169 __debug__::__inc_deletion(
"SequenceImplementation",
174 __debug__::__inc_deletion(
175 "HashTable", __FILE__, __LINE__,
"destructor of", (
void*)&empty_seq);
176 __debug__::__inc_deletion(
"SequenceIteratorSafe",
181 __debug__::__inc_deletion(
"SequenceIteratorSafe",
193 template <
typename GUM_SCALAR >
195 return "delete ( " +
__table.toString() +
" )";
static HashTable< const MultiDimImplementation< GUM_SCALAR > *, Idx > & __multidim2id()
returns the id corresponding to a given multidim
std::string toString() const
displays the content of the operation
Type type() const
returns the name of the operation
const Sequence< const ScheduleMultiDim< GUM_SCALAR > *> & multiDimResults() const
returns the set of multidims that should be the result of the operation
gum is the global namespace for all aGrUM entities
std::pair< long, long > memoryUsage() const
returns the memory consumption used during the operation
virtual ~ScheduleDeleteMultiDim()
destructor
ScheduleDeleteMultiDim(const ScheduleMultiDim< GUM_SCALAR > &table)
default constructor
void execute()
executes the operation
ScheduleOperation(Type t)
default constructor
a MultiDim Delete operator class used for scheduling inferences
ScheduleMultiDim< GUM_SCALAR > __table
ScheduleOperation< GUM_SCALAR > & operator=(const ScheduleOperation< GUM_SCALAR > &)
copy operator
float nbOperations() const
returns an estimation of the number of elementary operations needed to perform the ScheduleOperation ...
ScheduleDeleteMultiDim< GUM_SCALAR > & operator=(const ScheduleDeleteMultiDim< GUM_SCALAR > &)
copy operator
static HashTable< Idx, const MultiDimImplementation< GUM_SCALAR > *> & __id2multidim()
returns a mapping from id to multidimImplementations
virtual ScheduleDeleteMultiDim< GUM_SCALAR > * newFactory() const
virtual copy constructor: creates a clone of the operation
const Sequence< const ScheduleMultiDim< GUM_SCALAR > *> & multiDimArgs() const
returns the set of multidims passed in argument to the operation
bool operator==(const ScheduleOperation< GUM_SCALAR > &) const
operator ==
#define GUM_ERROR(type, msg)
bool operator!=(const ScheduleOperation< GUM_SCALAR > &) const
operator !=
Sequence< const ScheduleMultiDim< GUM_SCALAR > *> * __args
the set of ScheduleMultidims passed in arguments