aGrUM  0.14.2
utils_prm.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 udnder 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 #ifndef GUM_UTILS_PRM_H
21 #define GUM_UTILS_PRM_H
22 
23 #include <string>
24 #include <vector>
25 
26 #include <agrum/agrum.h>
27 
37 
39 
40 namespace gum {
41  namespace prm {
42 
44  typedef float prm_float;
45 
47  void decomposePath(const std::string& path, std::vector< std::string >& v);
48 
72  template < typename GUM_SCALAR >
75  const Potential< GUM_SCALAR >& source);
76 
77  template < typename GUM_SCALAR >
79  const Potential< GUM_SCALAR >& t2);
87  template < typename GUM_SCALAR >
88  void eliminateNode(const DiscreteVariable* var,
89  Set< Potential< GUM_SCALAR >* >& pool,
90  Set< Potential< GUM_SCALAR >* >& trash);
91 
92  template < typename GUM_SCALAR >
93  void eliminateNodes(const std::vector< const DiscreteVariable* >& elim_order,
94  Set< Potential< GUM_SCALAR >* >& pool,
95  Set< Potential< GUM_SCALAR >* >& trash);
96 
101  NodeId nextNodeId();
102 
103  } /* namespace prm */
104 } /* namespace gum */
105 
106 #include <agrum/PRM/utils_prm_tpl.h>
107 
108 #endif // GUM_UTILS_PRM_H
aGrUM&#39;s Potential is a multi-dimensional array with tensor operators.
Definition: potential.h:57
class for NoisyOR-net implementation as multiDim
Headers of the MultiDimBijArray class.
Headers of MultiDimSparse.
class for multiDimNoisyORCompound
Base class for discrete random variable.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Representation of a setA Set is a structure that contains arbitrary elements.
Definition: set.h:162
Header of the Potential class.
float prm_float
PRMType for real numbers.
Definition: utils_prm.h:44
Set of pairs of elements with fast search for both elements.
Definition: bijection.h:1803
Potential< GUM_SCALAR > * copyPotential(const Bijection< const DiscreteVariable *, const DiscreteVariable * > &bij, const Potential< GUM_SCALAR > &source)
Returns a copy of a Potential after applying a bijection over the variables in source.
Definition: utils_prm_tpl.h:27
Efficient functionals for projecting multiDimensional tables.
MultiDimAggregator.
void eliminateNode(const DiscreteVariable *var, Set< Potential< GUM_SCALAR > * > &pool, Set< Potential< GUM_SCALAR > * > &trash)
Proceeds with the elimination of var in pool.
void eliminateNodes(const std::vector< const DiscreteVariable * > &elim_order, Set< Potential< GUM_SCALAR > * > &pool, Set< Potential< GUM_SCALAR > * > &trash)
NodeId nextNodeId()
Returns the next value of an unique counter for PRM&#39;s node id.
Definition: utils_prm.cpp:63
Headers of the MultiDimBucket class.
void decomposePath(const std::string &path, std::vector< std::string > &v)
Decompose a string in a vector of strings using "." as separators.
Definition: utils_prm.cpp:27
Headers of PRMObject.
Size NodeId
Type for node ids.
Definition: graphElements.h:97
Potential< GUM_SCALAR > * multPotential(const Potential< GUM_SCALAR > &t1, const Potential< GUM_SCALAR > &t2)