aGrUM  0.14.2
simpleCPTDisturber.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
28 #ifndef GUM_SIMPLE_CPT_DISTURBER_H
29 #define GUM_SIMPLE_CPT_DISTURBER_H
30 
31 #include <cstdlib>
32 
34 #include <agrum/agrum.h>
35 
36 namespace gum {
37 
45  template < typename GUM_SCALAR >
46  class SimpleCPTDisturber : public ICPTDisturber< GUM_SCALAR > {
47  public:
48  // ############################################################################
50  // ############################################################################
52 
56 
60  ~SimpleCPTDisturber() override;
62 
63  // ############################################################################
65  // ############################################################################
67 
74  void disturbReducCPT(NodeId node,
75  BayesNet< GUM_SCALAR >& bayesNet,
77  Potential< GUM_SCALAR >& marg) override;
78 
86  void disturbAugmCPT(NodeId node,
87  BayesNet< GUM_SCALAR >& bayesNet,
89  GUM_SCALAR variation) override;
90  };
91 
92 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
93  extern template class SimpleCPTDisturber< double >;
94 #endif
95 
96 } /* namespace gum */
97 
99 #endif // SIMPLECPTDISTURBER_H
aGrUM&#39;s Potential is a multi-dimensional array with tensor operators.
Definition: potential.h:57
Class representing a Bayesian Network.
Definition: BayesNet.h:76
Interface-like class for disturbing Conditional Probability Tables.
<agrum/BN/generator/simpleCPTDisturber.h>
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Source implementation of SimpleCPTDisturber.
void disturbAugmCPT(NodeId node, BayesNet< GUM_SCALAR > &bayesNet, Potential< GUM_SCALAR > &src, GUM_SCALAR variation) override
Disturb a CPT using GUM_SCALAR when inserting a new parent new_parent.
SimpleCPTDisturber()
Default constructor.
~SimpleCPTDisturber() override
Destructor.
void disturbReducCPT(NodeId node, BayesNet< GUM_SCALAR > &bayesNet, Potential< GUM_SCALAR > &src, Potential< GUM_SCALAR > &marg) override
Disturb a CPT using GUM_SCALAR when removing parent varIdi.
Size NodeId
Type for node ids.
Definition: graphElements.h:97