aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::ScheduleOperation< GUM_SCALAR > Class Template Referenceabstract

#include <scheduleOperation.h>

+ Inheritance diagram for gum::ScheduleOperation< GUM_SCALAR >:

Public Member Functions

Constructors / Destructors
virtual ScheduleOperation< GUM_SCALAR > * newFactory () const =0
 virtual copy constructor: creates a clone of the operation More...
 
virtual ~ScheduleOperation ()
 destructor More...
 
Operators
virtual bool operator== (const ScheduleOperation< GUM_SCALAR > &) const =0
 operator == More...
 
virtual bool operator!= (const ScheduleOperation< GUM_SCALAR > &) const =0
 operator != More...
 
Accessors/Modifiers
Type type () const
 returns the name of the operation More...
 
Idx id () const
 returns the id of the operation More...
 
virtual const Sequence< const ScheduleMultiDim< GUM_SCALAR > *> & multiDimArgs () const =0
 returns the set of multidims passed in argument to the operation More...
 
virtual const Sequence< const ScheduleMultiDim< GUM_SCALAR > *> & multiDimResults () const =0
 returns the set of multidims that should be the result of the operation More...
 
virtual void execute ()=0
 executes the operation More...
 
virtual float nbOperations () const =0
 returns an estimation of the number of elementary operations needed to perform the ScheduleOperation More...
 
virtual std::pair< long, long > memoryUsage () const =0
 returns the memory consumption used during the operation More...
 
virtual std::string toString () const =0
 displays the content of the operation More...
 

Public Types

enum  Type : char {
  Type::COMBINE_MULTIDIM, Type::PROJECT_MULTIDIM, Type::DELETE_MULTIDIM, Type::CLIQUE_STORE_MULTIDIM,
  Type::SEPARATOR_STORE_MULTIDIM
}
 the currently supported types of operations More...
 

Protected Member Functions

 ScheduleOperation (Type t)
 default constructor More...
 
 ScheduleOperation (const ScheduleOperation< GUM_SCALAR > &from)
 copy constructor More...
 
ScheduleOperation< GUM_SCALAR > & operator= (const ScheduleOperation< GUM_SCALAR > &)
 copy operator More...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::ScheduleOperation< GUM_SCALAR >

Definition at line 41 of file scheduleOperation.h.

Member Enumeration Documentation

◆ Type

template<typename GUM_SCALAR >
enum gum::ScheduleOperation::Type : char
strong

the currently supported types of operations

Enumerator
COMBINE_MULTIDIM 

combine 2 ScheduleMultiDims

PROJECT_MULTIDIM 

project a ScheduleMultiDim over a subset of its variables

DELETE_MULTIDIM 

delete a MultiDim from memory

CLIQUE_STORE_MULTIDIM 

store a Multidim into a clique

SEPARATOR_STORE_MULTIDIM 

store a multidim into a separator

Definition at line 44 of file scheduleOperation.h.

44  : char
45  {
47  COMBINE_MULTIDIM,
49  PROJECT_MULTIDIM,
51  DELETE_MULTIDIM,
53  CLIQUE_STORE_MULTIDIM,
55  SEPARATOR_STORE_MULTIDIM
56  };

Constructor & Destructor Documentation

◆ ~ScheduleOperation()

template<typename GUM_SCALAR >
virtual gum::ScheduleOperation< GUM_SCALAR >::~ScheduleOperation ( )
virtual

destructor

◆ ScheduleOperation() [1/2]

template<typename GUM_SCALAR >
gum::ScheduleOperation< GUM_SCALAR >::ScheduleOperation ( Type  t)
explicitprotected

default constructor

◆ ScheduleOperation() [2/2]

template<typename GUM_SCALAR >
gum::ScheduleOperation< GUM_SCALAR >::ScheduleOperation ( const ScheduleOperation< GUM_SCALAR > &  from)
protected

copy constructor

Member Function Documentation

◆ _newId_()

template<typename GUM_SCALAR >
static Idx gum::ScheduleOperation< GUM_SCALAR >::_newId_ ( )
staticprivate

returns a new distinct ID for each operation

◆ execute()

◆ id()

template<typename GUM_SCALAR >
Idx gum::ScheduleOperation< GUM_SCALAR >::id ( ) const

returns the id of the operation

◆ memoryUsage()

template<typename GUM_SCALAR >
virtual std::pair< long, long > gum::ScheduleOperation< GUM_SCALAR >::memoryUsage ( ) const
pure virtual

returns the memory consumption used during the operation

Actually, this function does not return a precise account of the memory used by the ScheduleOperation but a rough estimate based on the sizes of the tables involved in the operation.

Returns
a pair of memory consumption: the first one is the maximum amount of memory used during the operation and the second one is the amount of memory still used at the end of the function ( the memory used by the resulting table )

Implemented in gum::ScheduleProject< GUM_SCALAR >, gum::ScheduleCombine< GUM_SCALAR >, gum::ScheduleSeparatorStoreMultiDim< GUM_SCALAR >, gum::ScheduleCliqueStoreMultiDim< GUM_SCALAR >, and gum::ScheduleDeleteMultiDim< GUM_SCALAR >.

◆ multiDimArgs()

template<typename GUM_SCALAR >
virtual const Sequence< const ScheduleMultiDim< GUM_SCALAR >* >& gum::ScheduleOperation< GUM_SCALAR >::multiDimArgs ( ) const
pure virtual

◆ multiDimResults()

template<typename GUM_SCALAR >
virtual const Sequence< const ScheduleMultiDim< GUM_SCALAR >* >& gum::ScheduleOperation< GUM_SCALAR >::multiDimResults ( ) const
pure virtual

◆ nbOperations()

template<typename GUM_SCALAR >
virtual float gum::ScheduleOperation< GUM_SCALAR >::nbOperations ( ) const
pure virtual

◆ newFactory()

template<typename GUM_SCALAR >
virtual ScheduleOperation< GUM_SCALAR >* gum::ScheduleOperation< GUM_SCALAR >::newFactory ( ) const
pure virtual

◆ operator!=()

template<typename GUM_SCALAR >
virtual bool gum::ScheduleOperation< GUM_SCALAR >::operator!= ( const ScheduleOperation< GUM_SCALAR > &  ) const
pure virtual

operator !=

Two operations are identical if and only if they have the same arguments and their types are identical (combine, project, etc)

Implemented in gum::ScheduleProject< GUM_SCALAR >, gum::ScheduleCombine< GUM_SCALAR >, gum::ScheduleSeparatorStoreMultiDim< GUM_SCALAR >, gum::ScheduleCliqueStoreMultiDim< GUM_SCALAR >, and gum::ScheduleDeleteMultiDim< GUM_SCALAR >.

◆ operator=()

template<typename GUM_SCALAR >
ScheduleOperation< GUM_SCALAR >& gum::ScheduleOperation< GUM_SCALAR >::operator= ( const ScheduleOperation< GUM_SCALAR > &  )
protected

copy operator

◆ operator==()

template<typename GUM_SCALAR >
virtual bool gum::ScheduleOperation< GUM_SCALAR >::operator== ( const ScheduleOperation< GUM_SCALAR > &  ) const
pure virtual

operator ==

Two operations are identical if and only if they have the same arguments and their types are identical (combine, project, etc)

Implemented in gum::ScheduleProject< GUM_SCALAR >, gum::ScheduleCombine< GUM_SCALAR >, gum::ScheduleSeparatorStoreMultiDim< GUM_SCALAR >, gum::ScheduleCliqueStoreMultiDim< GUM_SCALAR >, and gum::ScheduleDeleteMultiDim< GUM_SCALAR >.

◆ toString()

template<typename GUM_SCALAR >
virtual std::string gum::ScheduleOperation< GUM_SCALAR >::toString ( ) const
pure virtual

◆ type()

template<typename GUM_SCALAR >
Type gum::ScheduleOperation< GUM_SCALAR >::type ( ) const

returns the name of the operation

Member Data Documentation

◆ _id_

template<typename GUM_SCALAR >
Idx gum::ScheduleOperation< GUM_SCALAR >::_id_
private

the id corresponding to the operation

Definition at line 143 of file scheduleOperation.h.

◆ _type_

template<typename GUM_SCALAR >
Type gum::ScheduleOperation< GUM_SCALAR >::_type_
private

the name of the operation to perform

Definition at line 140 of file scheduleOperation.h.


The documentation for this class was generated from the following file: