aGrUM  0.14.2
O3SystemFactory.h
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
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 
29 #include <memory>
30 #include <string>
31 
32 #include <agrum/PRM/PRM.h>
33 #include <agrum/PRM/PRMFactory.h>
35 #include <agrum/PRM/o3prm/O3prm.h>
36 #include <agrum/core/hashTable.h>
37 #include <agrum/core/set.h>
38 
39 #ifndef GUM_PRM_O3PRM_O3SYSTEM_FACTORY_H
40 # define GUM_PRM_O3PRM_O3SYSTEM_FACTORY_H
41 
42 namespace gum {
43  namespace prm {
44  namespace o3prm {
45 
55  template < typename GUM_SCALAR >
57  public:
59  O3PRM& o3_prm,
61  ErrorsContainer& errors);
69 
70  void build();
71 
72  private:
77 
79 
81 
83 
85 
86  bool __checkSystem(O3System& sys);
87 
88  bool __checkIncrements(O3System& sys);
89 
91  const O3Instance& inst);
92 
93  bool __checkInstance(O3System& sys);
94 
95  bool __checkAssignments(O3System& sys);
96  };
97 
98  } // namespace o3prm
99  } // namespace prm
100 } // namespace gum
101 
102 // always include the implementation of the templates
104 
105 
106 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
107 extern template class gum::prm::o3prm::O3SystemFactory< double >;
108 # endif
109 
110 
111 #endif // GUM_PRM_O3PRM_O3SYSTEM_FACTORY_H
Sets of elements (i.e.
bool __checkParameters(const PRMClass< GUM_SCALAR > &type, const O3Instance &inst)
Implementation for the O3SystemFactory class.
void __addIncrements(PRMFactory< GUM_SCALAR > &factory, O3System &sys)
Headers of PRM.
Headers for the O3NameSolver class.
O3NameSolver< GUM_SCALAR > * __solver
This class is used contain and manipulate gum::ParseError.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Builds gum::prm::PRMSystem from gum::prm::o3prm::O3System.
The class for generic Hash Tables.
Definition: hashTable.h:676
Resolves names for the different O3PRM factories.
Definition: O3NameSolver.h:55
Factory which builds a PRM<GUM_SCALAR>.
Definition: PRMType.h:47
The O3Instance is part of the AST of the O3PRM language.
Definition: O3prm.h:788
void __addAssignments(PRMFactory< GUM_SCALAR > &factory, O3System &sys)
The O3System is part of the AST of the O3PRM language.
Definition: O3prm.h:826
Headers for the AST of the O3PRM language.
HashTable< std::string, O3Instance *> __nameMap
This class represents a Probabilistic Relational PRMSystem<GUM_SCALAR>.
Definition: PRM.h:63
A PRMClass is an object of a PRM representing a fragment of a Bayesian Network which can be instantia...
Definition: PRMClass.h:63
void __addInstances(PRMFactory< GUM_SCALAR > &factory, O3System &sys)
O3SystemFactory< GUM_SCALAR > & operator=(const O3SystemFactory< GUM_SCALAR > &src)
O3SystemFactory(PRM< GUM_SCALAR > &prm, O3PRM &o3_prm, O3NameSolver< GUM_SCALAR > &solver, ErrorsContainer &errors)
The O3PRM is part of the AST of the O3PRM language.
Definition: O3prm.h:890
Class hash tables iterators.
Headers of PRMFactory.