73 "OrderedEliminationSequenceStrategy needs either both nullptrs "
74 "or both non-nullptrs on graph and elimination ordering");
127 const std::vector< NodeId >*
order)
const {
128 if ((
graph_ ==
nullptr) || (
order ==
nullptr))
return true;
132 for (
const auto node: *
order) {
201 "update impossible because node "
202 << node <<
" does not correspond to the current elimination index");
207 std::size_t size =
_order_->size();
virtual bool setGraph(UndiGraph *graph, const NodeProperty< Size > *dom_sizes)
sets a new graph to be triangulated
EliminationSequenceStrategy()
default constructor
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 base for graph error.
Size size() const
alias for sizeNodes
bool existsNode(const NodeId id) const
returns true iff the NodeGraphPart contains the given nodeId
Exception : the element we looked for cannot be found.
OrderedEliminationSequenceStrategy * copyFactory() const final
virtual copy constructor
OrderedEliminationSequenceStrategy * newFactory() const final
creates a new elimination sequence of the same type as the current object, but this sequence contains...
NodeId nextNodeToEliminate() final
returns the new node to be eliminated within the triangulation algorithm
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
const EdgeSet & fillIns() final
in case fill-ins are provided, this function returns the fill-ins due to all the nodes eliminated so ...
bool providesFillIns() const final
indicates whether the fill-ins generated by the eliminated nodes, if needed, will be computed by the ...
const std::vector< NodeId > * _order_
the vector indicating in which order we should eliminate the nodes
~OrderedEliminationSequenceStrategy() override
destructor
bool _order_needed_
indicate whether a new complete ordering is necessary for the elimination
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
void eliminationUpdate(const NodeId node) final
performs all the graph/fill-ins updates provided (if any)
void askFillIns(bool do_it) final
if the elimination sequence is able to compute fill-ins, we indicate whether we want this feature to ...
void clear() final
clears the order (to prepare, for instance, a new elimination sequence)
bool providesGraphUpdate() const final
indicates whether the elimination sequence updates by itself the graph after a node has been eliminat...
virtual bool setOrder(const std::vector< NodeId > *order) final
sets the sequence of elimination
OrderedEliminationSequenceStrategy()
default constructor (uses an empty graph)
Exception : out of bound.
void insert(const Key &k)
Inserts a new element into the set.
Size size() const noexcept
Returns the number of elements in the set.
Base class for undirected graphs.
#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.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
gum is the global namespace for all aGrUM entities
An Elimination sequence algorithm that imposes a given complete ordering on the nodes elimination seq...
An Elimination sequence algorithm that imposes a given complete ordering on the nodes elimination seq...