109 from._simplicial_set_ =
nullptr;
171 double min_score = 0;
176 double score = possibleNodes.
priority(node);
178 if (!found || (score < min_score)) {
198 "the partial order does not cover all the nodes "
223 for (++iter; iter !=
nodeset_.cend(); ++iter) {
226 if (score < min_score) {
An Elimination sequence algorithm that imposes a given partial ordering on the nodes elimination sequ...
virtual NodeId nextNodeToEliminate() final
returns the new node to be eliminated within the triangulation algorithm
virtual void eliminationUpdate(const NodeId node) final
performs all the graph/fill-ins updates provided (if any)
virtual DefaultPartialOrderedEliminationSequenceStrategy * newFactory() const final
creates a new elimination sequence of the same type as the current object, but this sequence contains...
double _simplicial_threshold_
the threshold used by simplicial_set to determine small cliques
void _createSimplicialSet_()
create a new simplicial set suited for the current graph
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)
virtual const EdgeSet & fillIns() final
in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so ...
bool _provide_fill_ins_
indicates whether we compute new fill-ins
virtual bool providesFillIns() const final
indicates whether the fill-ins generated by the eliminated nodes, if needed, will be computed by the ...
double _simplicial_ratio_
the ratio used by simplicial_set for its quasi-simplicial nodes
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...
NodeId _nodeToEliminate_(const PriorityQueue< NodeId, double > &possibleNodes)
returns the best possible node to be eliminated
NodeProperty< double > _log_weights_
for each node, the weight of the clique created by the node's elimination
DefaultPartialOrderedEliminationSequenceStrategy(double theRatio=GUM_QUASI_RATIO, double theThreshold=GUM_WEIGHT_THRESHOLD)
default constructor (uses an empty graph)
virtual DefaultPartialOrderedEliminationSequenceStrategy * copyFactory() const final
virtual copy constructor
virtual ~DefaultPartialOrderedEliminationSequenceStrategy()
destructor
SimplicialSet * _simplicial_set_
the simplicial set used for determining the best nodes to eliminate
NodeProperty< double > log_domain_sizes_
the log of the domain sizes of the variables/nodes
UndiGraph * graph_
the graph to be triangulated
UndiGraph * graph() const noexcept
returns the current graph
virtual const EdgeSet & fillIns()
in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so ...
Generic doubly linked lists.
Exception : the element we looked for cannot be found.
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
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)
const int & priority(const Val &elt) const
Class enabling fast retrieval of simplicial, quasi and almost simplicial nodes.
Base class for undirected graphs.
An Elimination sequence algorithm that imposes a given partial ordering on the nodes elimination sequ...
#define GUM_ERROR(type, msg)
Set< Edge > EdgeSet
Some typdefs and define for shortcuts ...
Size NodeId
Type for node ids.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
gum is the global namespace for all aGrUM entities
Base classes for undirected graphs.