aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
aggregatorDecomposition.h
Go to the documentation of this file.
1 /**
2  *
3  * Copyright 2005-2019 Pierre-Henri WUILLEMIN & Christophe GONZALES(@AMU)
4  * {prenom.nom}_at_lip6.fr
5  *
6  * This library is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 /**
22  * @file
23  * @brief Headers of AggregatorDecomposition.
24  *
25  * @author Gaspard DUCAMP
26  */
27 
28 #ifndef AGRUM_AGGREGATORDECOMPOSITION_H
29 #define AGRUM_AGGREGATORDECOMPOSITION_H
30 
31 #include <agrum/PRM/PRM.h>
32 #include <agrum/PRM/elements/PRMSystem.h>
33 #include <ctime>
34 
35 namespace gum {
36  /**
37  * @class AggregatorDecomposition aggregatorDecomposition.h
38  *<agrum/BN/inference/tools/aggregatorDecomposition.h>
39  * @brief This class is used to decompose aggregator in PRM<GUM_SCALAR>.
40  */
41  template < typename GUM_SCALAR >
43  public:
44  // ========================================================================
45  /// @name Constructor & destructor.
46  // ========================================================================
47  /// @{
48 
49  /// Default constructor.
51 
52  /// Destructor.
53  virtual ~AggregatorDecomposition();
54 
56 
57  /// @}
58  // ========================================================================
59  /// @name Getters & setters.
60  // ========================================================================
61  /// @{
62 
63  virtual std::string name() const;
64 
66 
67  void setMaximumArity(gum::Size arity);
68 
69  /// @}
70  protected:
71  // ========================================================================
72  /// @name Private evidence handling methods and members.
73  // ========================================================================
74  /// @{
77  const DiscreteVariable& var,
78  Idx value);
79 
81 
83  Set< NodeId > nodes,
85  int& j);
86  /// @}
87 
88  private:
90  };
91 
92 
93 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
94  extern template class AggregatorDecomposition< double >;
95 #endif
96 
97 } /* namespace gum */
98 
99 #include <agrum/BN/inference/tools/aggregatorDecomposition_tpl.h>
100 
101 #endif // AGRUM_AGGREGATORDECOMPOSITION_H
INLINE void emplace(Args &&... args)
Definition: set_tpl.h:643
AggregatorDecomposition()
Default constructor.
<agrum/BN/inference/tools/aggregatorDecomposition.h>
virtual ~AggregatorDecomposition()
Destructor.
BayesNet< GUM_SCALAR > & decomposeAggregator_(BayesNet< GUM_SCALAR > &bn, NodeId node)
Set< NodeId > addDepthLayer_(BayesNet< GUM_SCALAR > &bn, Set< NodeId > nodes, NodeId initialAggregator, int &j)
BayesNet< GUM_SCALAR > & getDecomposedAggregator(BayesNet< GUM_SCALAR > &bn)
Default constructor.
NodeId addAggregator_(BayesNet< GUM_SCALAR > &bn, std::string aggType, const DiscreteVariable &var, Idx value)