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

#include <scheduleCombinationBasic.h>

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

Public Member Functions

Constructors / Destructors
 ScheduleCombinationBasic (MultiDimImplementation< GUM_SCALAR > *(*combine)(const MultiDimImplementation< GUM_SCALAR > &, const MultiDimImplementation< GUM_SCALAR > &))
 default constructor More...
 
 ScheduleCombinationBasic (const ScheduleCombinationBasic< GUM_SCALAR > &)
 copy constructor More...
 
virtual ~ScheduleCombinationBasic ()
 destructor More...
 
virtual ScheduleCombinationBasic< GUM_SCALAR > * newFactory () const
 virtual constructor More...
 
Accessors/Modifiers
virtual ScheduleMultiDim< GUM_SCALAR > combine (const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, Schedule< GUM_SCALAR > &)
 
ScheduleMultiDim< GUM_SCALAR > combine (const Set< const MultiDimImplementation< GUM_SCALAR > * > &set, Schedule< GUM_SCALAR > &)
 
template<template< typename > class TABLE>
ScheduleMultiDim< GUM_SCALAR > combine (const Set< const TABLE< GUM_SCALAR > * > &set, Schedule< GUM_SCALAR > &)
 
virtual void setCombineFunction (MultiDimImplementation< GUM_SCALAR > *(*combine)(const MultiDimImplementation< GUM_SCALAR > &, const MultiDimImplementation< GUM_SCALAR > &))
 changes the function used for combining two TABLES More...
 
virtual MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const MultiDimImplementation< GUM_SCALAR > &) combineFunction ()
 returns the combination function currently used by the combinator More...
 
virtual float nbOperations (const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)
 returns a rough estimate of the number of operations that will be performed to compute the combination More...
 
float nbOperations (const Set< const MultiDimImplementation< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)
 
template<template< typename > class TABLE>
float nbOperations (const Set< const TABLE< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)
 
virtual std::pair< long, long > memoryUsage (const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)
 returns the memory consumption used during the combination More...
 
std::pair< long, long > memoryUsage (const Set< const MultiDimImplementation< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)
 
template<template< typename > class TABLE>
std::pair< long, long > memoryUsage (const Set< const TABLE< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)
 

Protected Attributes

MultiDimImplementation< GUM_SCALAR > *(* combine_ )(const MultiDimImplementation< GUM_SCALAR > &t1, const MultiDimImplementation< GUM_SCALAR > &t2)
 the function used to combine two tables More...
 

Protected Member Functions

Size combinedSize_ (const Sequence< const DiscreteVariable * > &seq1, const Sequence< const DiscreteVariable * > &seq2) const
 returns the domain size of the Cartesian product of the union of all the variables in seq1 and seq2 More...
 

Detailed Description

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

Definition at line 89 of file scheduleCombinationBasic.h.

Constructor & Destructor Documentation

◆ ScheduleCombinationBasic() [1/2]

template<typename GUM_SCALAR >
gum::ScheduleCombinationBasic< GUM_SCALAR >::ScheduleCombinationBasic ( MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const MultiDimImplementation< GUM_SCALAR > &)  combine)

default constructor

◆ ScheduleCombinationBasic() [2/2]

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

copy constructor

◆ ~ScheduleCombinationBasic()

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

destructor

Member Function Documentation

◆ combine() [1/3]

template<typename GUM_SCALAR >
virtual ScheduleMultiDim< GUM_SCALAR > gum::ScheduleCombinationBasic< GUM_SCALAR >::combine ( const Set< const ScheduleMultiDim< GUM_SCALAR > * > &  set,
Schedule< GUM_SCALAR > &   
)
virtual
Returns
the ScheduleMultiDim resulting from the combination
Exceptions
InvalidArgumentsNumberexception is thrown if the set passed in argument contains less than two elements

Implements gum::ScheduleCombination< GUM_SCALAR >.

◆ combine() [2/3]

template<typename GUM_SCALAR >
ScheduleMultiDim< GUM_SCALAR > gum::ScheduleCombinationBasic< GUM_SCALAR >::combine ( const Set< const MultiDimImplementation< GUM_SCALAR > * > &  set,
Schedule< GUM_SCALAR > &   
)
Returns
the ScheduleMultiDim resulting from the combination
Exceptions
InvalidArgumentsNumberexception is thrown if the set passed in argument contains less than two elements

◆ combine() [3/3]

template<typename GUM_SCALAR >
template<template< typename > class TABLE>
ScheduleMultiDim< GUM_SCALAR > gum::ScheduleCombinationBasic< GUM_SCALAR >::combine ( const Set< const TABLE< GUM_SCALAR > * > &  set,
Schedule< GUM_SCALAR > &   
)
Returns
the ScheduleMultiDim resulting from the combination
Exceptions
InvalidArgumentsNumberexception is thrown if the set passed in argument contains less than two elements

◆ combinedSize_()

template<typename GUM_SCALAR >
Size gum::ScheduleCombinationBasic< GUM_SCALAR >::combinedSize_ ( const Sequence< const DiscreteVariable * > &  seq1,
const Sequence< const DiscreteVariable * > &  seq2 
) const
protected

returns the domain size of the Cartesian product of the union of all the variables in seq1 and seq2

◆ combineFunction()

template<typename GUM_SCALAR >
virtual MultiDimImplementation< GUM_SCALAR >*(*)( const MultiDimImplementation< GUM_SCALAR >&, const MultiDimImplementation< GUM_SCALAR >&) gum::ScheduleCombinationBasic< GUM_SCALAR >::combineFunction ( )
virtual

returns the combination function currently used by the combinator

Reimplemented from gum::ScheduleCombination< GUM_SCALAR >.

◆ memoryUsage() [1/3]

template<typename GUM_SCALAR >
virtual std::pair< long, long > gum::ScheduleCombinationBasic< GUM_SCALAR >::memoryUsage ( const Set< const ScheduleMultiDim< GUM_SCALAR > * > &  set,
const Schedule< GUM_SCALAR > &  schedule 
)
virtual

returns the memory consumption used during the combination

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

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::ScheduleCombination< GUM_SCALAR >.

◆ memoryUsage() [2/3]

template<typename GUM_SCALAR >
std::pair< long, long > gum::ScheduleCombinationBasic< GUM_SCALAR >::memoryUsage ( const Set< const MultiDimImplementation< GUM_SCALAR > * > &  set,
const Schedule< GUM_SCALAR > &  schedule 
)
Returns
the ScheduleMultiDim resulting from the combination
Exceptions
InvalidArgumentsNumberexception is thrown if the set passed in argument contains less than two elements

◆ memoryUsage() [3/3]

template<typename GUM_SCALAR >
template<template< typename > class TABLE>
std::pair< long, long > gum::ScheduleCombinationBasic< GUM_SCALAR >::memoryUsage ( const Set< const TABLE< GUM_SCALAR > * > &  set,
const Schedule< GUM_SCALAR > &  schedule 
)
Returns
the ScheduleMultiDim resulting from the combination
Exceptions
InvalidArgumentsNumberexception is thrown if the set passed in argument contains less than two elements

◆ nbOperations() [1/3]

template<typename GUM_SCALAR >
virtual float gum::ScheduleCombinationBasic< GUM_SCALAR >::nbOperations ( const Set< const ScheduleMultiDim< GUM_SCALAR > * > &  set,
const Schedule< GUM_SCALAR > &  schedule 
)
virtual

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

Implements gum::ScheduleCombination< GUM_SCALAR >.

◆ nbOperations() [2/3]

template<typename GUM_SCALAR >
float gum::ScheduleCombinationBasic< GUM_SCALAR >::nbOperations ( const Set< const MultiDimImplementation< GUM_SCALAR > * > &  set,
const Schedule< GUM_SCALAR > &  schedule 
)
Returns
the ScheduleMultiDim resulting from the combination
Exceptions
InvalidArgumentsNumberexception is thrown if the set passed in argument contains less than two elements

◆ nbOperations() [3/3]

template<typename GUM_SCALAR >
template<template< typename > class TABLE>
float gum::ScheduleCombinationBasic< GUM_SCALAR >::nbOperations ( const Set< const TABLE< GUM_SCALAR > * > &  set,
const Schedule< GUM_SCALAR > &  schedule 
)
Returns
the ScheduleMultiDim resulting from the combination
Exceptions
InvalidArgumentsNumberexception is thrown if the set passed in argument contains less than two elements

◆ newFactory()

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

virtual constructor

Returns
a new fresh ScheduleCombinator with the same combination function.

Implements gum::ScheduleCombination< GUM_SCALAR >.

◆ setCombineFunction()

template<typename GUM_SCALAR >
virtual void gum::ScheduleCombinationBasic< GUM_SCALAR >::setCombineFunction ( MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > &, const MultiDimImplementation< GUM_SCALAR > &)  combine)
virtual

changes the function used for combining two TABLES

Implements gum::ScheduleCombination< GUM_SCALAR >.

Member Data Documentation

◆ combine_

template<typename GUM_SCALAR >
MultiDimImplementation< GUM_SCALAR >*(* gum::ScheduleCombinationBasic< GUM_SCALAR >::combine_) (const MultiDimImplementation< GUM_SCALAR > &t1, const MultiDimImplementation< GUM_SCALAR > &t2)
protected

the function used to combine two tables

Definition at line 176 of file scheduleCombinationBasic.h.


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