94 from.partial_order_needed_ =
true;
120 if ((
graph_ ==
nullptr) || (subsets ==
nullptr))
return true;
124 for (
const auto& nodes: *subsets) {
125 for (
const auto node: nodes) {
126 if (
graph_->existsNode(node)) { nodes_found.
insert(node); }
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes)
sets a new graph to be triangulated
EliminationSequenceStrategy()
default constructor
UndiGraph * graph_
the graph to be triangulated
virtual void clear()
clears the sequence (to prepare, for instance, a new elimination sequence)
UndiGraph * graph() const noexcept
returns the current graph
Generic doubly linked lists.
bool isPartialOrderNeeded_(const List< NodeSet > *subsets) const
indicate whether a partial ordering is compatible with the current graph
bool partial_order_needed_
indicate whether a new partial ordering is necessary for the elimination
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes)
sets a new graph to be triangulated
virtual ~PartialOrderedEliminationSequenceStrategy()
destructor
const List< NodeSet > * subsets_
the subsets constituting the partial ordering
List< NodeSet >::const_iterator subset_iter_
the iterator indicating which is the current subset on which we work
PartialOrderedEliminationSequenceStrategy()
default constructor (uses an empty graph)
virtual bool setPartialOrder(const List< NodeSet > *subsets)
sets a new partial ordering constraint on the elimination sequence
NodeSet nodeset_
the nodes which can be currently eliminated
virtual void clear()
clears the sequence (to prepare, for instance, a new elimination sequence)
Size size() const noexcept
Returns the number of elements in the set.
void insert(const Key &k)
Inserts a new element into the set.
Base class for undirected graphs.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
gum is the global namespace for all aGrUM entities
Base class for all elimination sequence algorithm that impose a given partial ordering on the nodes e...
Base class for all elimination sequence algorithm that impose a given partial ordering on the nodes e...