aGrUM  0.18.1
a C++ library for (probabilistic) graphical models
PRM.h
Go to the documentation of this file.
1 
30 #ifndef GUM_PRM_H
31 #define GUM_PRM_H
32 
33 #include <string>
34 
37 
47 
49 
50 namespace gum {
51  namespace prm {
52 
53  template < typename GUM_SCALAR >
54  class PRMSystem;
55  template < typename GUM_SCALAR >
56  class PRMFactory;
65  template < typename GUM_SCALAR >
66  class PRM {
67  public:
68  friend class PRMFactory< GUM_SCALAR >;
69 
70  // ========================================================================
72  // ========================================================================
74 
78  PRM();
79 
83  ~PRM();
84 
86  // ========================================================================
88  // ========================================================================
90 
95  bool isType(const std::string& name) const;
96 
101  bool isClass(const std::string& name) const;
102 
109  bool isInterface(const std::string& name) const;
110 
115  bool isSystem(const std::string& name) const;
116 
121  PRMType& type(const std::string& name);
122 
127  const PRMType& type(const std::string& name) const;
128 
132  const Set< PRMType* >& types() const;
133 
138  PRMClass< GUM_SCALAR >& getClass(const std::string& name);
139 
144  const PRMClass< GUM_SCALAR >& getClass(const std::string& name) const;
145 
149  const Set< PRMClass< GUM_SCALAR >* >& classes() const;
150 
155  PRMInterface< GUM_SCALAR >& getInterface(const std::string& name);
156 
162  getInterface(const std::string& name) const;
163 
168 
174  PRMSystem< GUM_SCALAR >& getSystem(const std::string& name);
175 
181  const PRMSystem< GUM_SCALAR >& getSystem(const std::string& name) const;
182 
186  const Set< PRMSystem< GUM_SCALAR >* >& systems() const;
187 
189  private:
190  // ========================================================================
192  // ========================================================================
194 
198  PRM(const PRM< GUM_SCALAR >& source);
199 
204 
206  void addBuiltInTypes__();
207 
209  // ========================================================================
211  // ========================================================================
213 
216 
219 
222 
225 
228 
231 
234 
237 
239  };
240 
241 
242 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
243  extern template class PRM< double >;
244 #endif
245 
246 
247  } /* namespace prm */
248 } /* namespace gum */
249 
250 #include <agrum/PRM/PRM_tpl.h>
251 
252 #endif /* GUM_PRM_H */
PRMInterface< GUM_SCALAR > & getInterface(const std::string &name)
Returns a constant reference on a Class<GUM_SCALAR> given it&#39;s name.
Definition: PRM_tpl.h:128
const Set< PRMType *> & types() const
Returns the Set of all PRMType in this PRM.
Definition: PRM_tpl.h:104
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
bool isClass(const std::string &name) const
Definition: PRM_tpl.h:79
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
PRM()
Default constructor.
Definition: PRM_tpl.h:36
const Set< PRMSystem< GUM_SCALAR > *> & systems() const
Returns the Set of all Systems in this PRM.
Definition: PRM_tpl.h:158
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
HashTable< std::string, PRMSystem< GUM_SCALAR > *> systemMap__
Mapping of all Systems given their name.
Definition: PRM.h:233
const Set< PRMClass< GUM_SCALAR > *> & classes() const
Returns the Set of all Class<GUM_SCALAR> in this PRM.
Definition: PRM_tpl.h:122
Set< PRMInterface< GUM_SCALAR > *> interfaces__
Set of all Class<GUM_SCALAR> in this PRM.
Definition: PRM.h:224
const Set< PRMInterface< GUM_SCALAR > *> & interfaces() const
Returns the Set of all Class<GUM_SCALAR> in this PRM.
Definition: PRM_tpl.h:140
Set< PRMSystem< GUM_SCALAR > *> systems__
Set of all Systems in this PRM.
Definition: PRM.h:236
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
Definition: agrum.h:25
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
The class for generic Hash Tables.
Definition: hashTable.h:679
void addBuiltInTypes__()
Add the built-in types in the PRM.
Definition: PRM_tpl.h:64
bool isType(const std::string &name) const
Definition: PRM_tpl.h:74
Representation of a setA Set is a structure that contains arbitrary elements.
Definition: set.h:165
~PRM()
Destructor.
Definition: PRM_tpl.h:43
Factory which builds a PRM<GUM_SCALAR>.
Definition: PRMType.h:50
PRMType & type(const std::string &name)
Returns a constant reference on a PRMType given it&#39;s name.
Definition: PRM_tpl.h:94
HashTable< std::string, PRMType *> typeMap__
Mapping of all PRMType given their name.
Definition: PRM.h:227
bool isSystem(const std::string &name) const
Definition: PRM_tpl.h:89
PRMSystem< GUM_SCALAR > & getSystem(const std::string &name)
Returns a constant reference on a PRMSystem<GUM_SCALAR> given it&#39;s name.
Definition: PRM_tpl.h:146
A PRMSystem is a container of PRMInstance and describe a relational skeleton.
Definition: PRMObject.h:229
This is a decoration of the DiscreteVariable class.
Definition: PRMType.h:63
Set< PRMType *> types__
Set of all PRMType in this PRM.
Definition: PRM.h:230
An PRMInterface is implemented by a Class<GUM_SCALAR> and defines a set of PRMReferenceSlot<GUM_SCALA...
Definition: PRMClass.h:54
Set< PRMClass< GUM_SCALAR > *> classes__
Set of all Class<GUM_SCALAR> in this PRM.
Definition: PRM.h:218
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
This class represents a Probabilistic Relational PRMSystem<GUM_SCALAR>.
Definition: PRM.h:66
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
A PRMClass is an object of a PRM representing a fragment of a Bayesian Network which can be instantia...
Definition: PRMClass.h:66
PRMClass< GUM_SCALAR > & getClass(const std::string &name)
Returns a constant reference on a Class<GUM_SCALAR> given it&#39;s name.
Definition: PRM_tpl.h:110
PRM< GUM_SCALAR > & operator=(const PRM< GUM_SCALAR > &source)
Copy operator.
HashTable< std::string, PRMInterface< GUM_SCALAR > *> interfaceMap__
Mapping of all Class<GUM_SCALAR> given their name.
Definition: PRM.h:221
HashTable< std::string, PRMClass< GUM_SCALAR > *> classMap__
Mapping of all Class<GUM_SCALAR> given their name.
Definition: PRM.h:215
bool isInterface(const std::string &name) const
Definition: PRM_tpl.h:84
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN() & Christophe GONZALES() info_at_agrum_dot_org.