37 #endif // GUM_NOINLINE 51 const std::vector< NodeId >*
order) :
54 if (((graph ==
nullptr) && (order !=
nullptr))
55 || ((graph !=
nullptr) && (order ==
nullptr))) {
57 "OrderedEliminationSequenceStrategy needs either both nullptrs " 58 "or both non-nullptrs on graph and elimination ordering");
119 const std::vector< NodeId >*
order)
const {
120 if ((
_graph ==
nullptr) || (order ==
nullptr))
return true;
124 for (
const auto node : *order) {
134 const std::vector< NodeId >*
order) {
199 "update impossible because node " 201 <<
" does not correspond to the current elimination index");
206 std::size_t size =
__order->size();
virtual void clear()
clears the sequence (to prepare, for instance, a new elimination sequence)
virtual const EdgeSet & fillIns()
in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so ...
bool __isOrderNeeded(const std::vector< NodeId > *order) const
indicates whether an order is compatible with the current graph
UndiGraph * _graph
the graph to be triangulated
An Elimination sequence algorithm that imposes a given complete ordering on the nodes elimination seq...
Size size() const
alias for sizeNodes
OrderedEliminationSequenceStrategy()
default constructor (uses an empty graph)
bool __order_needed
indicate whether a new complete ordering is necessary for the elimination
virtual void clear() final
clears the order (to prepare, for instance, a new elimination sequence)
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes) final
sets a new graph to be triangulated
std::size_t __order_index
the index in the order indicating the new node to eliminate
virtual bool setOrder(const std::vector< NodeId > *order) final
sets the sequence of elimination
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The class for generic Hash Tables.
UndiGraph * graph() const noexcept
returns the current graph
virtual ~OrderedEliminationSequenceStrategy()
destructor
const std::vector< NodeId > * order() const noexcept
returns the current complete ordering
virtual NodeId nextNodeToEliminate() final
returns the new node to be eliminated within the triangulation algorithm
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)
bool existsNode(const NodeId id) const
returns true iff the NodeGraphPart contains the given nodeId
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes)
sets a new graph to be triangulated
The base class for all elimination sequence algorithms used by triangulation algorithms.
virtual OrderedEliminationSequenceStrategy * copyFactory() const final
virtual copy constructor
Base class for undirected graphs.
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.
const std::vector< NodeId > * __order
the vector indicating in which order we should eliminate the 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 ...
Size NodeId
Type for node ids.
void insert(const Key &k)
Inserts a new element into the set.
#define GUM_ERROR(type, msg)
virtual OrderedEliminationSequenceStrategy * newFactory() const final
creates a new elimination sequence of the same type as the current object, but this sequence contains...
virtual const EdgeSet & fillIns() final
in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so ...
virtual bool providesFillIns() const final
indicates whether the fill-ins generated by the eliminated nodes, if needed, will be computed by the ...