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

#include <scheduleProjectionBasic.h>

+ Inheritance diagram for gum::ScheduleProjectionBasic< GUM_SCALAR >:
+ Collaboration diagram for gum::ScheduleProjectionBasic< GUM_SCALAR >:

Public Member Functions

Constructors / Destructors
 ScheduleProjectionBasic (MultiDimImplementation< GUM_SCALAR > *(*proj)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))
 default constructor More...
 
 ScheduleProjectionBasic (const ScheduleProjectionBasic< GUM_SCALAR > &)
 copy constructor More...
 
virtual ~ScheduleProjectionBasic ()
 destructor More...
 
virtual ScheduleProjectionBasic< GUM_SCALAR > * newFactory () const
 virtual constructor More...
 
Accessors/Modifiers
ScheduleMultiDim< GUM_SCALAR > project (const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, Schedule< GUM_SCALAR > &schedule)
 creates and returns the projection of the table over a subset of its vars More...
 
ScheduleMultiDim< GUM_SCALAR > project (const MultiDimImplementation< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, Schedule< GUM_SCALAR > &schedule)
 creates and returns the projection of the table over a subset of its vars More...
 
template<template< typename > class TABLE>
ScheduleMultiDim< GUM_SCALAR > project (const TABLE< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, Schedule< GUM_SCALAR > &schedule)
 creates and returns the projection of the table over a subset of its vars More...
 
void setProjectFunction (MultiDimImplementation< GUM_SCALAR > *(*proj)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable * > &))
 changes the function used for projecting tables More...
 
MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable *> &) projectFunction ()
 returns the projection function currently used by the projector More...
 
virtual float nbOperations (const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)
 returns a rough estimate of the number of operations that will be performed to compute the projection More...
 
float nbOperations (const MultiDimImplementation< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)
 creates and returns the projection of the table over a subset of its vars More...
 
template<template< typename > class TABLE>
float nbOperations (const TABLE< GUM_SCALAR > &set, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)
 creates and returns the projection of the table over a subset of its vars More...
 
virtual std::pair< long, long > memoryUsage (const ScheduleMultiDim< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)
 returns the memory consumption used during the projection More...
 
std::pair< long, long > memoryUsage (const MultiDimImplementation< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)
 creates and returns the projection of the table over a subset of its vars More...
 
template<template< typename > class TABLE>
std::pair< long, long > memoryUsage (const TABLE< GUM_SCALAR > &table, const Set< const DiscreteVariable * > &del_vars, const Schedule< GUM_SCALAR > &schedule)
 creates and returns the projection of the table over a subset of its vars More...
 

Protected Attributes

MultiDimImplementation< GUM_SCALAR > *(* proj_ )(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable * > &)
 the projection function actually used More...
 

Detailed Description

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

Definition at line 72 of file scheduleProjectionBasic.h.

Constructor & Destructor Documentation

◆ ScheduleProjectionBasic() [1/2]

template<typename GUM_SCALAR >
gum::ScheduleProjectionBasic< GUM_SCALAR >::ScheduleProjectionBasic ( MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable * > &)  proj)
explicit

default constructor

◆ ScheduleProjectionBasic() [2/2]

template<typename GUM_SCALAR >
gum::ScheduleProjectionBasic< GUM_SCALAR >::ScheduleProjectionBasic ( const ScheduleProjectionBasic< GUM_SCALAR > &  )

copy constructor

◆ ~ScheduleProjectionBasic()

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

destructor

Member Function Documentation

◆ memoryUsage() [1/3]

template<typename GUM_SCALAR >
virtual std::pair< long, long > gum::ScheduleProjectionBasic< GUM_SCALAR >::memoryUsage ( const ScheduleMultiDim< GUM_SCALAR > &  table,
const Set< const DiscreteVariable * > &  del_vars,
const Schedule< GUM_SCALAR > &  schedule 
)
virtual

returns the memory consumption used during the projection

Actually, this function does not return a precise account of the memory used by the multidimProjection but a rough estimate based on the size of the table involved in the projection.

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

Implements gum::ScheduleProjection< GUM_SCALAR >.

◆ memoryUsage() [2/3]

template<typename GUM_SCALAR >
std::pair< long, long > gum::ScheduleProjectionBasic< GUM_SCALAR >::memoryUsage ( const MultiDimImplementation< GUM_SCALAR > &  table,
const Set< const DiscreteVariable * > &  del_vars,
const Schedule< GUM_SCALAR > &  schedule 
)

creates and returns the projection of the table over a subset of its vars

Returns
a new freshly created ScheduleMultiDim which is the result of the projection of the table passed in argument over the set of variables NOT IN del_vars
Warning
If del_vars is precisely equal to the variables of table, the result is an empty table.

◆ memoryUsage() [3/3]

template<typename GUM_SCALAR >
template<template< typename > class TABLE>
std::pair< long, long > gum::ScheduleProjectionBasic< GUM_SCALAR >::memoryUsage ( const TABLE< GUM_SCALAR > &  table,
const Set< const DiscreteVariable * > &  del_vars,
const Schedule< GUM_SCALAR > &  schedule 
)

creates and returns the projection of the table over a subset of its vars

Returns
a new freshly created ScheduleMultiDim which is the result of the projection of the table passed in argument over the set of variables NOT IN del_vars
Warning
If del_vars is precisely equal to the variables of table, the result is an empty table.

◆ nbOperations() [1/3]

template<typename GUM_SCALAR >
virtual float gum::ScheduleProjectionBasic< GUM_SCALAR >::nbOperations ( const ScheduleMultiDim< GUM_SCALAR > &  table,
const Set< const DiscreteVariable * > &  del_vars,
const Schedule< GUM_SCALAR > &  schedule 
)
virtual

returns a rough estimate of the number of operations that will be performed to compute the projection

Implements gum::ScheduleProjection< GUM_SCALAR >.

◆ nbOperations() [2/3]

template<typename GUM_SCALAR >
float gum::ScheduleProjectionBasic< GUM_SCALAR >::nbOperations ( const MultiDimImplementation< GUM_SCALAR > &  table,
const Set< const DiscreteVariable * > &  del_vars,
const Schedule< GUM_SCALAR > &  schedule 
)

creates and returns the projection of the table over a subset of its vars

Returns
a new freshly created ScheduleMultiDim which is the result of the projection of the table passed in argument over the set of variables NOT IN del_vars
Warning
If del_vars is precisely equal to the variables of table, the result is an empty table.

◆ nbOperations() [3/3]

template<typename GUM_SCALAR >
template<template< typename > class TABLE>
float gum::ScheduleProjectionBasic< GUM_SCALAR >::nbOperations ( const TABLE< GUM_SCALAR > &  set,
const Set< const DiscreteVariable * > &  del_vars,
const Schedule< GUM_SCALAR > &  schedule 
)

creates and returns the projection of the table over a subset of its vars

Returns
a new freshly created ScheduleMultiDim which is the result of the projection of the table passed in argument over the set of variables NOT IN del_vars
Warning
If del_vars is precisely equal to the variables of table, the result is an empty table.

◆ newFactory()

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

virtual constructor

Returns
a new fresh ScheduleCombinator with the same projection function.

Implements gum::ScheduleProjection< GUM_SCALAR >.

◆ operator=()

template<typename GUM_SCALAR >
ScheduleProjectionBasic< GUM_SCALAR >& gum::ScheduleProjectionBasic< GUM_SCALAR >::operator= ( const ScheduleProjectionBasic< GUM_SCALAR > &  )
private

to be coherent with combinations, forbid copy operators

◆ project() [1/3]

template<typename GUM_SCALAR >
ScheduleMultiDim< GUM_SCALAR > gum::ScheduleProjectionBasic< GUM_SCALAR >::project ( const ScheduleMultiDim< GUM_SCALAR > &  table,
const Set< const DiscreteVariable * > &  del_vars,
Schedule< GUM_SCALAR > &  schedule 
)
virtual

creates and returns the projection of the table over a subset of its vars

Returns
a new freshly created ScheduleMultiDim which is the result of the projection of the table passed in argument over the set of variables NOT IN del_vars
Warning
If del_vars is precisely equal to the variables of table, the result is an empty table.

Implements gum::ScheduleProjection< GUM_SCALAR >.

◆ project() [2/3]

template<typename GUM_SCALAR >
ScheduleMultiDim< GUM_SCALAR > gum::ScheduleProjectionBasic< GUM_SCALAR >::project ( const MultiDimImplementation< GUM_SCALAR > &  table,
const Set< const DiscreteVariable * > &  del_vars,
Schedule< GUM_SCALAR > &  schedule 
)

creates and returns the projection of the table over a subset of its vars

Returns
a new freshly created ScheduleMultiDim which is the result of the projection of the table passed in argument over the set of variables NOT IN del_vars
Warning
If del_vars is precisely equal to the variables of table, the result is an empty table.

◆ project() [3/3]

template<typename GUM_SCALAR >
template<template< typename > class TABLE>
ScheduleMultiDim< GUM_SCALAR > gum::ScheduleProjectionBasic< GUM_SCALAR >::project ( const TABLE< GUM_SCALAR > &  table,
const Set< const DiscreteVariable * > &  del_vars,
Schedule< GUM_SCALAR > &  schedule 
)

creates and returns the projection of the table over a subset of its vars

Returns
a new freshly created ScheduleMultiDim which is the result of the projection of the table passed in argument over the set of variables NOT IN del_vars
Warning
If del_vars is precisely equal to the variables of table, the result is an empty table.

◆ projectFunction()

template<typename GUM_SCALAR >
MultiDimImplementation< GUM_SCALAR >*(*)( const MultiDimImplementation< GUM_SCALAR >&, const Set< const DiscreteVariable* >&) gum::ScheduleProjectionBasic< GUM_SCALAR >::projectFunction ( )
virtual

returns the projection function currently used by the projector

Reimplemented from gum::ScheduleProjection< GUM_SCALAR >.

◆ setProjectFunction()

template<typename GUM_SCALAR >
void gum::ScheduleProjectionBasic< GUM_SCALAR >::setProjectFunction ( MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable * > &)  proj)
virtual

changes the function used for projecting tables

Implements gum::ScheduleProjection< GUM_SCALAR >.

Member Data Documentation

◆ proj_

template<typename GUM_SCALAR >
MultiDimImplementation< GUM_SCALAR >*(* gum::ScheduleProjectionBasic< GUM_SCALAR >::proj_) (const MultiDimImplementation< GUM_SCALAR > &, const Set< const DiscreteVariable *> &)
protected

the projection function actually used

Definition at line 166 of file scheduleProjectionBasic.h.


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