aGrUM  0.16.0
partialOrderedEliminationSequenceStrategy.h
Go to the documentation of this file.
1 
34 #ifndef GUM_PARTIAL_ORDERED_ELIMINATION_SEQUENCE_STRATEGY_H
35 #define GUM_PARTIAL_ORDERED_ELIMINATION_SEQUENCE_STRATEGY_H
36 
37 #include <agrum/core/list.h>
39 
40 namespace gum {
41 
57  public:
58  // ############################################################################
60  // ############################################################################
62 
65 
71 
74 
76 
77 
78  // ############################################################################
80  // ############################################################################
82 
84 
97  virtual bool setGraph(UndiGraph* graph, const NodeProperty< Size >* dom_sizes);
98 
100 
109  virtual bool setPartialOrder(const List< NodeSet >* subsets);
110 
113  virtual void clear();
114 
116  const List< NodeSet >* partialOrder() const noexcept;
117 
119 
122  bool isPartialOrderNeeded() const noexcept;
123 
125 
126 
127  protected:
129  const List< NodeSet >* _subsets{nullptr};
130 
133 
136 
139 
140 
142 
146  bool _isPartialOrderNeeded(const List< NodeSet >* subsets) const;
147 
148 
149  // ############################################################################
151  // ############################################################################
153 
156 
158 
170  UndiGraph* graph,
171  const NodeProperty< Size >* dom_sizes,
172  const List< NodeSet >* subsets);
173 
177 
181 
183  };
184 
185 } /* namespace gum */
186 
187 
188 #ifndef GUM_NO_INLINE
190 #endif // GUM_NOINLINE
191 
192 
193 #endif /* GUM_PARTIAL_ORDERED_ELIMINATION_SEQUENCE_STRATEGY_H */
virtual void clear()
clears the sequence (to prepare, for instance, a new elimination sequence)
virtual PartialOrderedEliminationSequenceStrategy * copyFactory() const =0
virtual copy constructor
bool _isPartialOrderNeeded(const List< NodeSet > *subsets) const
indicate whether a partial ordering is compatible with the current graph
virtual bool setPartialOrder(const List< NodeSet > *subsets)
sets a new partial ordering constraint on the elimination sequence
Generic doubly linked lists.
Definition: list.h:372
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
The class for generic Hash Tables.
Definition: hashTable.h:679
UndiGraph * graph() const noexcept
returns the current graph
Base class for all elimination sequence algorithm that impose a given partial ordering on the nodes e...
PartialOrderedEliminationSequenceStrategy()
default constructor (uses an empty graph)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes)
sets a new graph to be triangulated
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
NodeSet _nodeset
the nodes which can be currently eliminated
virtual PartialOrderedEliminationSequenceStrategy * newFactory() const =0
creates a new elimination sequence of the same type as the current object, but this sequence contains...
const List< NodeSet > * _subsets
the subsets constituting the partial ordering
Unsafe but fast const iterators for Lists.
Definition: list.h:1508
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The base class for all elimination sequence algorithms used by triangulation algorithms.
bool isPartialOrderNeeded() const noexcept
indicates if a new partial ordering is needed
Base class for undirected graphs.
Definition: undiGraph.h:109
const List< NodeSet > * partialOrder() const noexcept
returns the current partial ordering
List< NodeSet >::const_iterator _subset_iter
the iterator indicating which is the current subset on which we work
bool _partial_order_needed
indicate whether a new partial ordering is necessary for the elimination