58 double theThreshold) :
100 from._simplicial_set_ =
nullptr;
185 double min_weight = iter_heuristic.val();
186 NodeId removable_node = iter_heuristic.key();
187 for (++iter_heuristic; iter_heuristic !=
_log_weights_.cend(); ++iter_heuristic) {
188 if (iter_heuristic.val() < min_weight) {
189 removable_node = iter_heuristic.key();
190 min_weight = iter_heuristic.val();
194 return removable_node;
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 NodeId nextNodeToEliminate() final
returns the new node to be eliminated within the triangulation algorithm
void _createSimplicialSet_()
create a new simplicial set suited for the current graph
double _simplicial_threshold_
the threshold used by simplicial_set to determine small cliques
NodeProperty< double > _log_weights_
for each node, the weight of the clique created by the node's elimination
virtual const EdgeSet & fillIns() final
in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so ...
double _simplicial_ratio_
the ratio used by simplicial_set for its quasi-simplicial nodes
virtual bool providesGraphUpdate() const final
indicates whether the elimination sequence updates by itself the graph after a node has been eliminat...
virtual void clear() final
clears the sequence (to prepare, for instance, a new elimination sequence)
virtual ~DefaultEliminationSequenceStrategy()
destructor
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)
SimplicialSet * _simplicial_set_
the simplicial set used for determining the best nodes to eliminate
virtual bool providesFillIns() const final
indicates whether the fill-ins generated by the eliminated nodes, if needed, will be computed by the ...
bool _provide_fill_ins_
indicates whether we compute new fill-ins
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes) final
sets a new graph to be triangulated
virtual DefaultEliminationSequenceStrategy * newFactory() const final
creates a new elimination sequence of the same type as the current object, but this sequence contains...
virtual DefaultEliminationSequenceStrategy * copyFactory() const final
virtual copy constructor
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes)
sets a new graph to be triangulated
NodeProperty< double > log_domain_sizes_
the log of the domain sizes of the variables/nodes
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
virtual const EdgeSet & fillIns()
in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so ...
Exception : the element we looked for cannot be found.
Class enabling fast retrieval of simplicial, quasi and almost simplicial nodes.
UnconstrainedEliminationSequenceStrategy()
default constructor
Base class for undirected graphs.
An efficient unconstrained elimination sequence algorithm.
#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