aGrUM  0.16.0
operatorPattern4MultiDimFunctionGraph.h
Go to the documentation of this file.
1 
31 // check if we allowed these patterns to be used
32 #ifndef GUM_OPERATOR_PATTERN_ALLOWED
33 
34 // #warning To use operatorPattern4MultiDimFunctionGraph.h, you must define
35 // GUM_OPERATOR_PATTERN_ALLOWED
36 
37 #else
38 
39 # include <agrum/core/functors.h>
40 
44 
45 namespace gum {
46 
53 # ifdef GUM_MULTI_DIM_OPERATOR_NAME
54 # define GUM_MULTI_DIM_OPERATOR_TYPE GUM_SCALAR
55  template < typename GUM_SCALAR >
56  MultiDimFunctionGraph< GUM_SCALAR >* GUM_MULTI_DIM_OPERATOR_NAME(
59 # endif
60 
61  // clang-format off
62 
63 #ifdef GUM_MULTI_DIM_OPERATOR_IMPL2DECISION_GRAPH_NAME
64 #define GUM_MULTI_DIM_OPERATOR_TYPE GUM_SCALAR
65  template <typename GUM_SCALAR>
66  MultiDimImplementation<GUM_SCALAR>*
67  GUM_MULTI_DIM_OPERATOR_IMPL2DECISION_GRAPH_NAME(
68  const MultiDimImplementation<GUM_SCALAR>* tt1,
69  const MultiDimImplementation<GUM_SCALAR>* tt2 )
70 #endif
71 
72  // clang-format on
73 
74  {
75 
76 # ifdef GUM_MULTI_DIM_OPERATOR_IMPL2DECISION_GRAPH_NAME
78  reinterpret_cast< const MultiDimFunctionGraph< GUM_SCALAR >* >(tt1);
80  reinterpret_cast< const MultiDimFunctionGraph< GUM_SCALAR >* >(tt2);
81 # endif
82  MultiDimFunctionGraphOperator< GUM_MULTI_DIM_OPERATOR_TYPE,
83  GUM_MULTI_DIM_OPERATOR >
84  ope(dg1, dg2);
85 
86  return ope.compute();
87  }
88 # undef GUM_MULTI_DIM_OPERATOR_TYPE
89 
90 } // End of namespace gum
91 #endif /* GUM_OPERATOR_PATTERN_ALLOWED */
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.