aGrUM  0.14.2
scheduleProjectionBasic.h File Reference

A generic class to project efficiently a ScheduleMultiDim over a subset of its variables. More...

+ Include dependency graph for scheduleProjectionBasic.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gum::ScheduleProjectionBasic< GUM_SCALAR >
 

Namespaces

 gum
 gum is the global namespace for all aGrUM entities
 

Detailed Description

A generic class to project efficiently a ScheduleMultiDim over a subset of its variables.

ScheduleProjection is a generic wrapper designed to project efficiently a multidimensional schedule object over a subset of its variables.

To be quite generic, the ScheduleProjection takes in argument the function that produces the result of the projection of the multidimensional object. The following code gives an example of the usage of ScheduleProjection:

// a function used to project a MultiDimImplementation<float>:
MultiDimImplementation<float>*
MinPot ( const MultiDimImplementation<float>& table,
const Set<const DiscreteVariable*>& del_vars ) {
return new MultiDimImplementation<float> (...);
}
// another function used to project a MultiDimImplementation<float>:
MultiDimImplementation<float>*
MaxPot ( const Potential<float>& table,
const Set<const DiscreteVariable*>& del_vars ) {
return new Potential<float> (...);
}
Schedule<float> schedule;
ScheduleMultiDim<float> t1, t2;
Set<const DiscreteVariable*> set1, set2;
ScheduleProjectionBasic<float> Proj ( MinPot );
ScheduleMultiDim<float> proj_table1 = Proj.project ( t1, set1, schedule );
// change the operator to apply
Proj.setProjectFunction ( MaxPot );
ScheduleMultiDim<float> proj_table2 = Proj.project ( t2, set2, schedule );
Author
Christophe GONZALES and Pierre-Henri WUILLEMIN

Definition in file scheduleProjectionBasic.h.