aGrUM  0.14.2
junctionTreeStrategy.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_JUNCTION_TREE_STRATEGY_H
28 #define GUM_JUNCTION_TREE_STRATEGY_H
29 
30 #include <agrum/agrum.h>
31 
34 
35 namespace gum {
36 
37  class StaticTriangulation;
38 
46  public:
47  // ############################################################################
49  // ############################################################################
51 
53  virtual ~JunctionTreeStrategy();
54 
56  virtual JunctionTreeStrategy* newFactory() const = 0;
57 
59 
62  virtual JunctionTreeStrategy*
63  copyFactory(StaticTriangulation* triangulation = nullptr) const = 0;
64 
66 
67 
68  // ############################################################################
70  // ############################################################################
72 
79  virtual bool requiresFillIns() const = 0;
80 
82 
90  virtual const CliqueGraph& junctionTree() = 0;
91 
93  virtual void setTriangulation(StaticTriangulation* triangulation) = 0;
94 
97  virtual void moveTriangulation(StaticTriangulation* triangulation);
98 
101  virtual const NodeProperty< NodeId >& createdCliques() = 0;
102 
105  virtual NodeId createdClique(const NodeId id) = 0;
106 
108  virtual void clear() = 0;
109 
111 
112 
113  protected:
116 
117 
118  // ############################################################################
120  // ############################################################################
122 
125 
128 
131 
133  };
134 
135 } /* namespace gum */
136 
137 #endif /* GUM_JUNCTION_TREE_STRATEGY_H */
virtual const NodeProperty< NodeId > & createdCliques()=0
returns, for each node, the clique of the junction tree which was created by its deletion ...
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
virtual bool requiresFillIns() const =0
indicates whether the junction tree strategy needs fill-ins to work properly
StaticTriangulation * _triangulation
the triangulation to which the junction tree is associated
The class for generic Hash Tables.
Definition: hashTable.h:676
virtual void clear()=0
resets the current junction tree strategy data structures
virtual JunctionTreeStrategy * copyFactory(StaticTriangulation *triangulation=nullptr) const =0
virtual copy constructor
virtual void setTriangulation(StaticTriangulation *triangulation)=0
assigns the triangulation to the junction tree strategy
Base Class for all the algorithms producing a junction given a set of cliques/subcliques resulting fr...
Basic graph of cliques.
Definition: cliqueGraph.h:55
JunctionTreeStrategy()
default constructor
base class for all non-incremental triangulation methods
virtual ~JunctionTreeStrategy()
destructor
virtual NodeId createdClique(const NodeId id)=0
returns the Id of the clique of the junction tree created by the elimination of a given node during t...
Basic class for all graphs of cliques (join trees, etc)
virtual const CliqueGraph & junctionTree()=0
returns the junction tree computed
virtual JunctionTreeStrategy * newFactory() const =0
create a clone not assigned to any triangulation algorithm
virtual void moveTriangulation(StaticTriangulation *triangulation)
assigns a new triangulation to the junction tree strategy during a move construction ...
Size NodeId
Type for node ids.
Definition: graphElements.h:97
some utils for topology : NodeId, Edge, Arc and consorts ...