aGrUM  0.14.2
staticTriangulation_inl.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  ***************************************************************************/
26 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 
28 
29 namespace gum {
30 
31 
33  INLINE
34  const std::vector< NodeId >& StaticTriangulation::eliminationOrder() {
36 
37  return __elim_order;
38  }
39 
40 
43  INLINE
46 
47  return __reverse_elim_order[id];
48  }
49 
50 
53  INLINE
54  const NodeProperty< NodeId >& StaticTriangulation::reverseEliminationOrder() {
56 
57  return __reverse_elim_order;
58  }
59 
60 
62  INLINE
63  const CliqueGraph& StaticTriangulation::eliminationTree() {
65 
66  return __elim_tree;
67  }
68 
69 
71  INLINE
72  const CliqueGraph& StaticTriangulation::junctionTree() {
73  // checks if junctionTree already exists
74  if (!__has_junction_tree) {
76  __has_junction_tree = true;
77  }
78 
79  return *__junction_tree;
80  }
81 
82 
84  INLINE
85  const CliqueGraph& StaticTriangulation::maxPrimeSubgraphTree() {
87 
89  }
90 
91 
94  INLINE
97 
98  return __node_2_max_prime_clique[id];
99  }
100 
101 
104  INLINE
107  }
108 
109 
112  INLINE
113  const NodeProperty< NodeId >& StaticTriangulation::createdJunctionTreeCliques() {
115  }
116 
117 
119  INLINE
120  void StaticTriangulation::setFillIns(bool b) {
121  __we_want_fill_ins = b;
123  }
124 
125 
127  INLINE
128  const UndiGraph* StaticTriangulation::originalGraph() const {
129  return __original_graph;
130  }
131 
132 
134  INLINE EliminationSequenceStrategy&
137  }
138 
139 
141  INLINE JunctionTreeStrategy& StaticTriangulation::junctionTreeStrategy() const {
142  return *_junction_tree_strategy;
143  }
144 
145 
147  INLINE bool StaticTriangulation::isMinimalityRequired() const {
148  return __minimality_required;
149  }
150 
151 
152 } /* namespace gum */
153 
154 
155 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
const CliqueGraph & junctionTree()
returns a compatible junction tree
virtual const NodeProperty< NodeId > & createdCliques()=0
returns, for each node, the clique of the junction tree which was created by its deletion ...
const UndiGraph * originalGraph() const
returns the graph to be triangulated
virtual bool isMinimalityRequired() const final
indicates wether minimality is required
NodeProperty< NodeId > __node_2_max_prime_clique
indicates which clique of the max prime junction tree was created by the elmination of a given node (...
void __triangulate()
the function that performs the triangulation
bool __has_max_prime_junction_tree
indicates whether a maximal prime subgraph junction tree has been constructed
EliminationSequenceStrategy * _elimination_sequence_strategy
the elimination sequence strategy used by the triangulation
const UndiGraph * __original_graph
a pointer to the (external) original graph (which will be triangulated)
void __computeMaxPrimeJunctionTree()
computes the junction tree of the maximal prime subgraphs
JunctionTreeStrategy * _junction_tree_strategy
the junction tree strategy used by the triangulation
NodeId createdMaxPrimeSubgraph(const NodeId id)
returns the Id of the maximal prime subgraph created by the elimination of a given node during the tr...
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
NodeProperty< NodeId > __reverse_elim_order
the elimination order (access by NodeId)
JunctionTreeStrategy & junctionTreeStrategy() const
returns the junction tree strategy used by the triangulation
bool __has_triangulation
a boolean indicating whether we have parformed a triangulation
const CliqueGraph & eliminationTree()
returns the elimination tree of a compatible ordering
bool __has_junction_tree
a boolean indicating whether the junction tree has been constructed
void setFillIns(bool)
sets/unsets the record of the fill-ins in the standard triangulation procedure
const NodeProperty< NodeId > & reverseEliminationOrder()
returns a table indicating, for each node, at which step it was deleted by the triangulation process ...
CliqueGraph __max_prime_junction_tree
the maximal prime subgraph junction tree computed from the junction tree
const std::vector< NodeId > & eliminationOrder()
returns an elimination ordering compatible with the triangulated graph
EliminationSequenceStrategy & eliminationSequenceStrategy() const
returns the elimination sequence strategy used by the triangulation
const NodeProperty< NodeId > & createdJunctionTreeCliques()
returns the Ids of the cliques of the junction tree created by the elimination of the nodes ...
bool __we_want_fill_ins
a boolean indicating if we want fill-ins list with the standard triangulation method ...
bool __minimality_required
indicates whether the triangulation must be minimal
const CliqueGraph * __junction_tree
the junction tree computed by the algorithm
void __computeEliminationTree()
returns an elimination tree from a triangulated graph
bool __has_elimination_tree
a boolean indicating whether the elimination tree has been computed
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...
virtual const CliqueGraph & junctionTree()=0
returns the junction tree computed
std::vector< NodeId > __elim_order
the order in which nodes are eliminated by the algorithm
const CliqueGraph & maxPrimeSubgraphTree()
returns a junction tree of maximal prime subgraphs
Size NodeId
Type for node ids.
Definition: graphElements.h:97
NodeId createdJunctionTreeClique(const NodeId id)
returns the Id of the clique of the junction tree created by the elimination of a given node during t...
CliqueGraph __elim_tree
the elimination tree computed by the algorithm
virtual void askFillIns(bool do_it)=0
if the elimination sequence is able to compute fill-ins, we indicate whether we want this feature to ...