aGrUM  0.14.2
defaultPartialOrderedEliminationSequenceStrategy.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  ***************************************************************************/
43 #ifndef GUM_DEFAULT_PARTIAL_ORDERED_ELIMINATION_SEQUENCE_STRATEGY_H
44 #define GUM_DEFAULT_PARTIAL_ORDERED_ELIMINATION_SEQUENCE_STRATEGY_H
45 
50 
51 namespace gum {
52 
81  public:
82  // ############################################################################
84  // ############################################################################
86 
88 
93  double theRatio = GUM_QUASI_RATIO,
94  double theThreshold = GUM_WEIGHT_THRESHOLD);
95 
97 
113  UndiGraph* graph,
114  const NodeProperty< Size >* dom_sizes,
115  const List< NodeSet >* subsets,
116  double ratio = GUM_QUASI_RATIO,
117  double threshold = GUM_WEIGHT_THRESHOLD);
118 
120 
131 
135 
138 
144  newFactory() const final;
145 
147 
157  copyFactory() const final;
158 
160 
161 
162  // ############################################################################
164  // ############################################################################
166 
168 
179  virtual bool setGraph(UndiGraph* graph,
180  const NodeProperty< Size >* dom_sizes) final;
181 
184  virtual void clear() final;
185 
187 
189  virtual NodeId nextNodeToEliminate() final;
190 
197  virtual void askFillIns(bool do_it) final;
198 
206  virtual bool providesFillIns() const final;
207 
210  virtual bool providesGraphUpdate() const final;
211 
213 
215  virtual void eliminationUpdate(const NodeId node) final;
216 
219  virtual const EdgeSet& fillIns() final;
220 
222 
223  private:
227 
230 
233 
236 
238  bool __provide_fill_ins{false};
239 
240 
242 
244 
246  void __createSimplicialSet();
247  };
248 
249 } /* namespace gum */
250 
251 #endif /* GUM_DEFAULT_PARTIAL_ORDERED_ELIMINATION_SEQUENCE_STRATEGY_H */
Base class for all elimination sequence algorithm that impose a given partial ordering on the nodes e...
virtual void clear() final
clears the sequence (to prepare, for instance, a new elimination sequence)
void __createSimplicialSet()
create a new simplicial set suited for the current graph
#define GUM_WEIGHT_THRESHOLD
Definition: simplicialSet.h:38
virtual void eliminationUpdate(const NodeId node) final
performs all the graph/fill-ins updates provided (if any)
Class for fast retrieval of simplicial and quasi/almost simplicial nodes.
virtual DefaultPartialOrderedEliminationSequenceStrategy * newFactory() const final
creates a new elimination sequence of the same type as the current object, but this sequence contains...
virtual bool providesFillIns() const final
indicates whether the fill-ins generated by the eliminated nodes, if needed, will be computed by the ...
virtual const EdgeSet & fillIns() final
in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so ...
virtual void askFillIns(bool do_it) final
if the elimination sequence is able to compute fill-ins, we indicate whether we want this feature to ...
NodeProperty< double > __log_weights
for each node, the weight of the clique created by the node&#39;s elimination
double __simplicial_ratio
the ratio used by __simplicial_set for its quasi-simplicial nodes
virtual NodeId nextNodeToEliminate() final
returns the new node to be eliminated within the triangulation algorithm
Generic doubly linked lists.
Definition: list.h:369
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
double __simplicial_threshold
the threshold used by __simplicial_set to determine small cliques
An Elimination sequence algorithm that imposes a given partial ordering on the nodes elimination sequ...
NodeId __nodeToEliminate(const PriorityQueue< NodeId, double > &possibleNodes)
returns the best possible node to be eliminated
The class for generic Hash Tables.
Definition: hashTable.h:676
UndiGraph * graph() const noexcept
returns the current graph
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
Base class for all elimination sequence algorithm that impose a given partial ordering on the nodes e...
Class enabling fast retrieval of simplicial, quasi and almost simplicial nodes.
Definition: simplicialSet.h:57
virtual bool providesGraphUpdate() const final
indicates whether the elimination sequence updates by itself the graph after a node has been eliminat...
priority queues (in which an element cannot appear more than once)
virtual DefaultPartialOrderedEliminationSequenceStrategy * copyFactory() const final
virtual copy constructor
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes) final
sets a new graph to be triangulated
Base class for undirected graphs.
Definition: undiGraph.h:106
DefaultPartialOrderedEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
#define GUM_QUASI_RATIO
Definition: simplicialSet.h:37
Size NodeId
Type for node ids.
Definition: graphElements.h:97
some utils for topology : NodeId, Edge, Arc and consorts ...