47#ifndef GUM_SCHEDULE_BINARY_COMBINATION_H
48#define GUM_SCHEDULE_BINARY_COMBINATION_H
101 template <
typename TABLE1,
typename TABLE2,
typename TABLE_RES >
121 TABLE_RES (*combine)(
const TABLE1&,
const TABLE2&),
122 const bool is_result_persistent =
false);
The Table-agnostic base class of scheduleMultiDim.
const Sequence< const IScheduleMultiDim * > & args() const final
returns the sequence of arguments passed to the operator
ScheduleBinaryCombination(ScheduleBinaryCombination< TABLE1, TABLE2, TABLE_RES > &&from)
move constructor
Sequence< const IScheduleMultiDim * > _args_
the sequence of arguments passed to the operator
double nbOperations() const final
returns an estimation of the number of elementary operations needed to perform the ScheduleOperator
ScheduleBinaryCombination(const ScheduleMultiDim< TABLE1 > &table1, const ScheduleMultiDim< TABLE2 > &table2, TABLE_RES(*combine)(const TABLE1 &, const TABLE2 &), const bool is_result_persistent=false)
default constructor
bool isExecuted() const final
indicates whether the operator has been executed
const ScheduleMultiDim< TABLE1 > & arg1() const
returns the first argument of the combination
void setCombinationFunction(TABLE_RES(*combine)(const TABLE1 &, const TABLE2 &))
use a new combination function
bool hasSimilarArguments(const ScheduleOperator &) const final
checks whether two ScheduleCombination have similar parameters (same variables)
std::pair< double, double > memoryUsage() const final
returns the memory consumption used during the execution of the operator
void undo() final
undo a previous execution, if any
void execute() final
executes the operator
ScheduleMultiDim< TABLE_RES > * _result_
the result of the combination
ScheduleBinaryCombination< TABLE1, TABLE2, TABLE_RES > * clone() const final
virtual copy constructor
const ScheduleMultiDim< TABLE2 > * _arg2_
the second argument of the combination
bool isSameOperator(const ScheduleOperator &) const final
checks whether two ScheduleOperator perform the same set of operations
const ScheduleMultiDim< TABLE2 > & arg2() const
returns the first argument of the combination
std::string toString() const final
displays the content of the operator
Sequence< const IScheduleMultiDim * > _results_
the sequence of ScheduleMultidim output by the operator
TABLE_RES(* _combine_)(const TABLE1 &, const TABLE2 &)
the function actually used to perform the combination
bool hasSameArguments(const ScheduleOperator &) const final
checks whether two ScheduleCombination have the same parameters (same variables and same content)
const ScheduleMultiDim< TABLE1 > * _arg1_
the first argument of the combination
void updateArgs(const Sequence< const IScheduleMultiDim * > &new_args) final
modifies the arguments of the operator
ScheduleBinaryCombination(const ScheduleBinaryCombination< TABLE1, TABLE2, TABLE_RES > &from)
copy constructor
const ScheduleMultiDim< TABLE_RES > & result() const
returns the result of the combination
const Sequence< const IScheduleMultiDim * > & results() const final
returns the ScheduleMultidim resulting from the operator
ScheduleOperator(const ScheduleOperatorType type, const bool imply_deletion, const bool are_results_persistent)
default constructor
The generic class for storing (ordered) sequences of objects.
gum is the global namespace for all aGrUM entities
a binary combination operator class used for scheduling inferences
a Wrapper for multi-dimensional tables used for scheduling inferences
the base class for "low-level" operators used to schedule inferences