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);
109 virtual bool setGraph(UndiGraph* graph,
110 const NodeProperty< Size >* dom_sizes)
final;
123 virtual bool setOrder(
const std::vector< NodeId >* order)
final;
126 virtual void clear()
final;
195 #ifndef GUM_NO_INLINE 196 # include <agrum/tools/graphs/algorithms/triangulations/eliminationStrategies/orderedEliminationSequenceStrategy_inl.h> bool isOrderNeeded() const noexcept
indicates whether a new complete ordering is needed
const std::vector< NodeId > * order__
the vector indicating in which order we should eliminate the nodes
An Elimination sequence algorithm that imposes a given complete ordering on the nodes elimination seq...
bool order_needed__
indicate whether a new complete ordering is necessary for the elimination
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
std::size_t order_index__
the index in the order indicating the new node to eliminate
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
virtual void eliminationUpdate(const NodeId node) final
performs all the graph/fill-ins updates provided (if any)
OrderedEliminationSequenceStrategy(OrderedEliminationSequenceStrategy &&from)
move constructor
bool isOrderNeeded__(const std::vector< NodeId > *order) const
indicates whether an order is compatible with the current graph
virtual OrderedEliminationSequenceStrategy * copyFactory() const final
virtual copy constructor
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 ...