aGrUM  0.14.2
defaultJunctionTreeStrategy.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  ***************************************************************************/
27 #ifndef GUM_DEFAULT_JUNCTION_TREE_STRATEGY_H
28 #define GUM_DEFAULT_JUNCTION_TREE_STRATEGY_H
29 
31 
32 namespace gum {
33 
42  public:
43  // ############################################################################
45  // ############################################################################
47 
50 
53 
56 
59 
61  virtual DefaultJunctionTreeStrategy* newFactory() const final;
62 
64 
68  copyFactory(StaticTriangulation* triangulation = nullptr) const final;
69 
71 
72 
73  // ############################################################################
75  // ############################################################################
77 
84  virtual bool requiresFillIns() const final;
85 
87 
97  virtual const CliqueGraph& junctionTree() final;
98 
100 
104  virtual void setTriangulation(StaticTriangulation* triangulation) final;
105 
110  virtual const NodeProperty< NodeId >& createdCliques() final;
111 
118  virtual NodeId createdClique(const NodeId id) final;
119 
121  virtual void clear() final;
122 
124 
125  private:
127  bool __has_junction_tree{false};
128 
131 
135 
137  void __computeJunctionTree();
138  };
139 
140 } /* namespace gum */
141 
142 #endif /* GUM_DEFAULT_JUNCTION_TREE_STRATEGY_H */
virtual NodeId createdClique(const NodeId id) final
returns the Id of the clique of the junction tree created by the elimination of a given node during t...
virtual DefaultJunctionTreeStrategy * copyFactory(StaticTriangulation *triangulation=nullptr) const final
virtual copy constructor
virtual DefaultJunctionTreeStrategy * newFactory() const final
create a clone not assigned to any triangulation algorithm
virtual void setTriangulation(StaticTriangulation *triangulation) final
assigns the triangulation to the junction tree strategy
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
The class for generic Hash Tables.
Definition: hashTable.h:676
void __computeJunctionTree()
computes a junction tree from an elimination tree
NodeProperty< NodeId > __node_2_junction_clique
indicates which clique of the junction tree was created by the elimination of a given node (the key o...
virtual const NodeProperty< NodeId > & createdCliques() final
returns, for each node, the clique of the junction tree which was created by its deletion ...
Base Class for all the algorithms producing a junction given a set of cliques/subcliques resulting fr...
Base Class for all the algorithms producing a junction given a set of cliques/subcliques resulting fr...
virtual bool requiresFillIns() const final
indicates whether the junction tree strategy needs fill-ins to work properly
Basic graph of cliques.
Definition: cliqueGraph.h:55
CliqueGraph __junction_tree
the junction tree computed by the algorithm
virtual void clear() final
resets the current junction tree strategy data structures
base class for all non-incremental triangulation methods
virtual const CliqueGraph & junctionTree() final
returns the junction tree computed
bool __has_junction_tree
a boolean indicating whether the junction tree has been constructed
Size NodeId
Type for node ids.
Definition: graphElements.h:97
An algorithm producing a junction given the elimination tree produced by a triangulation algorithm...