aGrUM  0.14.2
binaryJoinTreeConverterDefault.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  ***************************************************************************/
25 #ifndef GUM_BINARY_JOIN_TREE_CONVERTER_DEFAULT_H
26 #define GUM_BINARY_JOIN_TREE_CONVERTER_DEFAULT_H
27 
29 
30 namespace gum {
31 
33  public:
34  // ############################################################################
36  // ############################################################################
38 
41 
44 
46 
47  // ############################################################################
49  // ############################################################################
51 
53 
66  const NodeProperty< Size >& domain_sizes,
67  const NodeSet& roots);
68 
70  const NodeSet& roots() const;
71 
73 
74  private:
77 
80 
84 
88  NodeId root,
89  NodeProperty< bool >& mark) const;
90 
93  NodeId current_node,
94  NodeId from,
95  const NodeProperty< Size >& domain_sizes,
96  NodeProperty< bool >& mark) const;
97 
100  NodeId clique,
101  NodeId from,
102  const NodeProperty< Size >& domain_sizes) const;
103 
105  float __combinedSize(const NodeSet& nodes1,
106  const NodeSet& nodes2,
107  const NodeProperty< Size >& domain_sizes) const;
108  };
109 
110 } /* namespace gum */
111 
112 #endif /* GUM_BINARY_JOIN_TREE_CONVERTER_DEFAULT_H */
BinaryJoinTreeConverterDefault & operator=(const BinaryJoinTreeConverterDefault &)
forbid copy operator
CliqueGraph convert(const CliqueGraph &JT, const NodeProperty< Size > &domain_sizes, const NodeSet &roots)
returns a binary join tree corresponding to clique graph JT
void __markConnectedComponent(const CliqueGraph &JT, NodeId root, NodeProperty< bool > &mark) const
a function used to mark the nodes belonging to a given connected component
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
The class for generic Hash Tables.
Definition: hashTable.h:676
const NodeSet & roots() const
returns all the roots considered for all the connected components
void __convertClique(CliqueGraph &JT, NodeId clique, NodeId from, const NodeProperty< Size > &domain_sizes) const
convert a clique and its adjacent cliques into a binary join tree
void __convertConnectedComponent(CliqueGraph &JT, NodeId current_node, NodeId from, const NodeProperty< Size > &domain_sizes, NodeProperty< bool > &mark) const
convert a whole connected component into a binary join tree
Basic graph of cliques.
Definition: cliqueGraph.h:55
NodeSet __roots
the new roots that have been created to compute the last query
The base interface for converting a join tree into a binary join tree.
float __combinedSize(const NodeSet &nodes1, const NodeSet &nodes2, const NodeProperty< Size > &domain_sizes) const
returns the domain size of the union of two cliques
Size NodeId
Type for node ids.
Definition: graphElements.h:97