aGrUM  0.16.0
defaultEliminationSequenceStrategy.h
Go to the documentation of this file.
1 
43 #ifndef GUM_DEFAULT_ELIMINATION_SEQUENCE_STRATEGY_H
44 #define GUM_DEFAULT_ELIMINATION_SEQUENCE_STRATEGY_H
45 
46 
47 #include <agrum/agrum.h>
51 
52 
53 namespace gum {
54 
55 
78  public:
79  // ############################################################################
81  // ############################################################################
83 
85 
90  double theThreshold = GUM_WEIGHT_THRESHOLD);
91 
93 
107  const NodeProperty< Size >* dom_sizes,
108  double ratio = GUM_QUASI_RATIO,
109  double threshold = GUM_WEIGHT_THRESHOLD);
110 
112 
123 
126 
129 
134  virtual DefaultEliminationSequenceStrategy* newFactory() const final;
135 
137 
146  virtual DefaultEliminationSequenceStrategy* copyFactory() const final;
147 
149 
150 
151  // ############################################################################
153  // ############################################################################
155 
157 
168  virtual bool setGraph(UndiGraph* graph,
169  const NodeProperty< Size >* dom_sizes) final;
170 
173  virtual void clear() final;
174 
176 
178  virtual NodeId nextNodeToEliminate() final;
179 
186  virtual void askFillIns(bool do_it) final;
187 
195  virtual bool providesFillIns() const final;
196 
207  virtual bool providesGraphUpdate() const final;
208 
210 
212  virtual void eliminationUpdate(const NodeId node) final;
213 
216  virtual const EdgeSet& fillIns() final;
217 
219 
220  private:
224 
227 
230 
233 
235  bool __provide_fill_ins{false};
236 
237 
239  void __createSimplicialSet();
240  };
241 
242 
243 } /* namespace gum */
244 
245 
246 #endif /* GUM_DEFAULT_ELIMINATION_SEQUENCE_STRATEGY_H */
void __createSimplicialSet()
create a new simplicial set suited for the current graph
NodeProperty< double > __log_weights
for each node, the weight of the clique created by the node&#39;s elimination
#define GUM_WEIGHT_THRESHOLD
Definition: simplicialSet.h:41
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual void eliminationUpdate(const NodeId node) final
performs all the graph/fill-ins updates provided (if any)
DefaultEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
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 ...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
SimplicialSet * __simplicial_set
the simplicial set used for determining the best nodes to eliminate
The class for generic Hash Tables.
Definition: hashTable.h:679
double __simplicial_ratio
the ratio used by __simplicial_set for its quasi-simplicial nodes
UndiGraph * graph() const noexcept
returns the current graph
An efficient unconstrained elimination sequence algorithm.
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 ...
virtual bool providesGraphUpdate() const final
indicates whether the elimination sequence updates by itself the graph after a node has been eliminat...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Class enabling fast retrieval of simplicial, quasi and almost simplicial nodes.
Definition: simplicialSet.h:60
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes) final
sets a new graph to be triangulated
virtual void clear() final
clears the sequence (to prepare, for instance, a new elimination sequence)
Base class for undirected graphs.
Definition: undiGraph.h:109
#define GUM_QUASI_RATIO
Definition: simplicialSet.h:40
bool __provide_fill_ins
indicates whether we compute new fill-ins
virtual NodeId nextNodeToEliminate() final
returns the new node to be eliminated within the triangulation algorithm
The base class for all elimination sequence algorithms that require only the graph to be triangulated...
Size NodeId
Type for node ids.
Definition: graphElements.h:98
virtual DefaultEliminationSequenceStrategy * copyFactory() const final
virtual copy constructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
double __simplicial_threshold
the threshold used by __simplicial_set to determine small cliques
virtual DefaultEliminationSequenceStrategy * newFactory() const final
creates a new elimination sequence of the same type as the current object, but this sequence contains...