aGrUM  0.14.2
groundedInference.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  ***************************************************************************/
26 #ifndef GUM_GROUNDED_INFERENCE_H
27 #define GUM_GROUNDED_INFERENCE_H
28 
31 
32 namespace gum {
33  namespace prm {
43  template < typename GUM_SCALAR >
44  class GroundedInference : public PRMInference< GUM_SCALAR > {
45  public:
46  // ========================================================================
48  // ========================================================================
50 
53  const PRMSystem< GUM_SCALAR >& system);
54 
56  virtual ~GroundedInference();
57 
59  // ========================================================================
61  // ========================================================================
63 
72 
84 
85  virtual std::string name() const;
86 
88  protected:
89  // ========================================================================
91  // ========================================================================
93 
96  virtual void
98 
101  virtual void
103 
108  virtual void
109  _marginal(const typename PRMInference< GUM_SCALAR >::Chain& chain,
111 
116  virtual void _joint(
117  const std::vector< typename PRMInference< GUM_SCALAR >::Chain >& queries,
119 
121  private:
123  GroundedInference(const GroundedInference& source);
124 
127 
130 
132  };
133 
134 
135 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
136  extern template class GroundedInference< double >;
137 #endif
138 
139 
140  } /* namespace prm */
141 } /* namespace gum */
142 
144 
145 #endif /* GUM_GROUNDED_INFERENCE_H */
aGrUM&#39;s Potential is a multi-dimensional array with tensor operators.
Definition: potential.h:57
Inline implementation of GroundedInference.
MarginalTargetedInference< GUM_SCALAR > * __inf
The bayesnet inference engine used by this class.
virtual void _evidenceRemoved(const typename PRMInference< GUM_SCALAR >::Chain &chain)
This method is called whenever an evidence is removed, but BEFORE any processing made by PRMInference...
virtual void _joint(const std::vector< typename PRMInference< GUM_SCALAR >::Chain > &queries, Potential< GUM_SCALAR > &j)
Generic method to compute the marginal of given element.
virtual std::string name() const
Returns the bayesnet inference engine used by this class.
virtual void _marginal(const typename PRMInference< GUM_SCALAR >::Chain &chain, Potential< GUM_SCALAR > &m)
Generic method to compute the marginal of given element.
<agrum/BN/inference/marginalTargetedInference.h>
Generic doubly linked lists.
Definition: list.h:369
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
This file contains the abstract inference class definition for computing (incrementally) marginal pos...
virtual ~GroundedInference()
Destructor.
Headers of PRMInference.
A PRMSystem is a container of PRMInstance and describe a relational skeleton.
Definition: PRMObject.h:226
MarginalTargetedInference< GUM_SCALAR > & getBNInference()
Returns the bayesnet inference engine used by this class.
GroundedInference(const PRM< GUM_SCALAR > &prm, const PRMSystem< GUM_SCALAR > &system)
Default constructor.
std::pair< const PRMInstance< GUM_SCALAR > *, const PRMAttribute< GUM_SCALAR > *> Chain
Code alias.
Definition: PRMInference.h:54
GroundedInference & operator=(const GroundedInference &source)
Copy operator.
This abstract class is used as base class for all inference class on PRM<GUM_SCALAR>.
Definition: PRMInference.h:49
This class represents a Probabilistic Relational PRMSystem<GUM_SCALAR>.
Definition: PRM.h:63
virtual void _evidenceAdded(const typename PRMInference< GUM_SCALAR >::Chain &chain)
This method is called whenever an evidence is added, but AFTER any processing made by PRMInference...
List< const Potential< GUM_SCALAR > *> __obs
void setBNInference(MarginalTargetedInference< GUM_SCALAR > *bn_inf)
Defines the bayesnet inference engine used by this class.
<agrum/PRM/groundedInference.h>