aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
IVisitableGraphLearner.h
Go to the documentation of this file.
1 /**
2  *
3  * Copyright (c) 2005-2021 by Pierre-Henri WUILLEMIN(@LIP6) & Christophe GONZALES(@AMU)
4  * info_at_agrum_dot_org
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 /**
23  * @file
24  * @brief Headers of the Learning Strategy interface.
25  *
26  * @author Pierre-Henri WUILLEMIN(@LIP6) and Jean-Christophe MAGNAN and Christophe
27  * GONZALES(@AMU)
28  */
29 
30 
31 // =========================================================================
32 #ifndef GUM_INTERFACE_VISITABLE_GRAPH_LEARNER_H
33 #define GUM_INTERFACE_VISITABLE_GRAPH_LEARNER_H
34 // =========================================================================
35 #include <agrum/tools/core/sequence.h>
36 // =========================================================================
37 #include <agrum/tools/graphs/parts/nodeGraphPart.h>
38 // =========================================================================
39 #include <agrum/tools/multidim/implementations/multiDimFunctionGraph.h>
40 // =========================================================================
41 #include <agrum/tools/variables/discreteVariable.h>
42 // =========================================================================
43 
44 namespace gum {
45 
46  /**
47  * @class IVisitableGraphLearner IVisitableGraphLearner.h
48  * <agrum/FMDP/SDyna/IVisitableGraphLearner.h>
49  * @brief Interface for manipulating FMDP learner
50  * @ingroup fmdp_group
51  *
52  */
54  // ###################################################################
55  /// @name Constructor & destructor.
56  // ###################################################################
57  /// @{
58  public:
59  // ==========================================================================
60  /// Destructor (virtual and empty since it's an interface)
61  // ==========================================================================
62  virtual ~IVisitableGraphLearner() {}
63 
64  /// @}
65 
66 
67  // ###################################################################
68  /// @name Visit Methods
69  // ###################################################################
70  /// @{
71  public:
72  // ==========================================================================
73  ///
74  // ==========================================================================
75  virtual NodeId root() const = 0;
76 
77  // ==========================================================================
78  ///
79  // ==========================================================================
80  virtual bool isTerminal(NodeId ni) const = 0;
81 
82  // ==========================================================================
83  ///
84  // ==========================================================================
85  virtual const DiscreteVariable* nodeVar(NodeId ni) const = 0;
86 
87  // ==========================================================================
88  ///
89  // ==========================================================================
90  virtual NodeId nodeSon(NodeId ni, Idx modality) const = 0;
91 
92  // ==========================================================================
93  ///
94  // ==========================================================================
95  virtual Idx nodeNbObservation(NodeId ni) const = 0;
96 
97  virtual void insertSetOfVars(MultiDimFunctionGraph< double >*) const = 0;
98 
99 
100  /// @}
101  };
102 } // namespace gum
103 #endif // GUM_INTERFACE_VISITABLE_GRAPH_LEARNER_H
INLINE void emplace(Args &&... args)
Definition: set_tpl.h:643
<agrum/FMDP/SDyna/IVisitableGraphLearner.h>
virtual NodeId root() const =0
virtual ~IVisitableGraphLearner()
Destructor (virtual and empty since it&#39;s an interface)
virtual const DiscreteVariable * nodeVar(NodeId ni) const =0
virtual bool isTerminal(NodeId ni) const =0
virtual void insertSetOfVars(MultiDimFunctionGraph< double > *) const =0
virtual NodeId nodeSon(NodeId ni, Idx modality) const =0
virtual Idx nodeNbObservation(NodeId ni) const =0