29 #ifndef GUM_ORDERED_ELIMINATION_SEQUENCE_STRATEGY_H 30 #define GUM_ORDERED_ELIMINATION_SEQUENCE_STRATEGY_H 32 #include <agrum/tools/graphs/algorithms/triangulations/eliminationStrategies/eliminationSequenceStrategy.h> 67 const NodeProperty< Size >* dom_sizes,
68 const std::vector< NodeId >* order);
108 virtual bool setGraph(UndiGraph* graph,
const NodeProperty< Size >* dom_sizes)
final;
121 virtual bool setOrder(
const std::vector< NodeId >* order)
final;
124 virtual void clear()
final;
193 #ifndef GUM_NO_INLINE 194 # include <agrum/tools/graphs/algorithms/triangulations/eliminationStrategies/orderedEliminationSequenceStrategy_inl.h> bool isOrderNeeded() const noexcept
indicates whether a new complete ordering is needed
An Elimination sequence algorithm that imposes a given complete ordering on the nodes elimination seq...
INLINE void emplace(Args &&... args)
OrderedEliminationSequenceStrategy()
default constructor (uses an empty graph)
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
virtual bool setOrder(const std::vector< NodeId > *order) final
sets the sequence of elimination
virtual ~OrderedEliminationSequenceStrategy()
destructor
OrderedEliminationSequenceStrategy(const OrderedEliminationSequenceStrategy &from)
copy constructor
bool _isOrderNeeded_(const std::vector< NodeId > *order) const
indicates whether an order is compatible with the current graph
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
const std::vector< NodeId > * _order_
the vector indicating in which order we should eliminate the nodes
virtual void eliminationUpdate(const NodeId node) final
performs all the graph/fill-ins updates provided (if any)
OrderedEliminationSequenceStrategy(OrderedEliminationSequenceStrategy &&from)
move constructor
virtual OrderedEliminationSequenceStrategy * copyFactory() const final
virtual copy constructor
bool _order_needed_
indicate whether a new complete ordering is necessary for the elimination
OrderedEliminationSequenceStrategy(UndiGraph *graph, const NodeProperty< Size > *dom_sizes, const std::vector< NodeId > *order)
constructor for an a priori non empty graph
virtual bool providesGraphUpdate() const final
indicates whether the elimination sequence updates by itself the graph after a node has been eliminat...
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 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 ...
std::size_t _order_index_
the index in the order indicating the new node to eliminate