aGrUM  0.16.0
multiDimCompleteProjection.h
Go to the documentation of this file.
1 
29 #ifndef GUM_MULTI_DIM_COMPLETE_PROJECTION_H
30 #define GUM_MULTI_DIM_COMPLETE_PROJECTION_H
31 
32 #include <agrum/core/set.h>
35 #include <utility>
36 
37 namespace gum {
38 
39  // clang-format off
47  // clang-format on
48  template < typename GUM_SCALAR, template < typename > class TABLE >
50  public:
51  // ========================================================================
53  // ========================================================================
55 
57  MultiDimCompleteProjection(GUM_SCALAR (*proj)(const TABLE< GUM_SCALAR >&,
58  Instantiation*));
59 
63 
66 
74 
76  // ========================================================================
78  // ========================================================================
80 
82  GUM_SCALAR project(const TABLE< GUM_SCALAR >& table,
83  Instantiation* instantiation = 0);
84 
86  void setProjectFunction(GUM_SCALAR (*proj)(const TABLE< GUM_SCALAR >&,
87  Instantiation*));
88 
90  GUM_SCALAR(*projectFunction())
91  (const TABLE< GUM_SCALAR >&, Instantiation*);
92 
94 
95  protected:
97  GUM_SCALAR (*_proj)(const TABLE< GUM_SCALAR >&, Instantiation*);
98 
99  private:
103  };
104 
105 } /* namespace gum */
106 
107 // always include the template implementation
109 
110 #endif /* GUM_MULTI_DIM_COMPLETE_PROJECTION_H */
A generic class to project efficiently a MultiDim table over all of its variables.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual MultiDimCompleteProjection< GUM_SCALAR, TABLE > * newFactory() const
Virtual constructor.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
MultiDimCompleteProjection< GUM_SCALAR, TABLE > & operator=(const MultiDimCompleteProjection< GUM_SCALAR, TABLE > &)
Forbid copy operators.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
virtual ~MultiDimCompleteProjection()
Destructor.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
GUM_SCALAR(* _proj)(const TABLE< GUM_SCALAR > &, Instantiation *)
The projection function actually used.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Class for assigning/browsing values to tuples of discrete variables.
Definition: instantiation.h:83
GUM_SCALAR project(const TABLE< GUM_SCALAR > &table, Instantiation *instantiation=0)
Creates and returns the projection of the table over all of its vars.
void setProjectFunction(GUM_SCALAR(*proj)(const TABLE< GUM_SCALAR > &, Instantiation *))
Changes the function used for projecting TABLES.
MultiDimCompleteProjection(GUM_SCALAR(*proj)(const TABLE< GUM_SCALAR > &, Instantiation *))
Default constructor.