91 new_strategy->_triangulation = tr;
95 new_strategy->setTriangulation(tr);
149 "No triangulation has been assigned to " 150 "the DefaultJunctionTreeStrategy");
166 auto size = elim_order.size();
167 std::vector< NodeId > substitution(size);
168 std::iota(substitution.begin(), substitution.end(), 0);
177 for (
auto i = size; i >= 1; --i) {
185 if ((C_i > C_jj) && !mark[
Edge(C_jj, C_i)]
201 substitution[C_i] = C_j;
208 for (std::size_t i = 0; i < size; ++i)
209 substitution[i] = substitution[substitution[i]];
virtual NodeId createdClique(const NodeId id) final
returns the Id of the clique of the junction tree created by the elimination of a given node during t...
const UndiGraph * originalGraph() const
returns the graph to be triangulated
virtual DefaultJunctionTreeStrategy * copyFactory(StaticTriangulation *triangulation=nullptr) const final
virtual copy constructor
virtual void eraseNode(const NodeId node)
removes a given clique from the clique graph
DefaultJunctionTreeStrategy()
default constructor
virtual DefaultJunctionTreeStrategy * newFactory() const final
create a clone not assigned to any triangulation algorithm
virtual void clear()
removes all the cliques and separators from the graph (as well as their adjacent edges) ...
virtual void setTriangulation(StaticTriangulation *triangulation) final
assigns the triangulation to the junction tree strategy
gum is the global namespace for all aGrUM entities
StaticTriangulation * _triangulation
the triangulation to which the junction tree is associated
The class for generic Hash Tables.
void __computeJunctionTree()
computes a junction tree from an elimination tree
const NodeSet & neighbours(const NodeId id) const
returns the set of edges adjacent to a given node
EdgeProperty< VAL > edgesProperty(VAL(*f)(const Edge &), Size size=0) const
a method to create a hashMap of VAL from a set of edges (using for every edge, say x...
const CliqueGraph & eliminationTree()
returns the elimination tree of a compatible ordering
NodeProperty< NodeId > __node_2_junction_clique
indicates which clique of the junction tree was created by the elimination of a given node (the key o...
virtual const NodeProperty< NodeId > & createdCliques() final
returns, for each node, the clique of the junction tree which was created by its deletion ...
virtual ~DefaultJunctionTreeStrategy()
destructor
const std::vector< NodeId > & eliminationOrder()
returns an elimination ordering compatible with the triangulated graph
virtual void eraseEdge(const Edge &edge)
removes an edge (and its separator) from the clique graph
Base Class for all the algorithms producing a junction given a set of cliques/subcliques resulting fr...
base class for all non-incremental triangulations.
virtual bool requiresFillIns() const final
indicates whether the junction tree strategy needs fill-ins to work properly
virtual void addEdge(const NodeId first, const NodeId second)
inserts a new edge between two cliques
const NodeSet & clique(const NodeId idClique) const
returns the set of nodes included into a given clique
CliqueGraph __junction_tree
the junction tree computed by the algorithm
An algorithms producing a junction given the elimination tree produced by the triangulation algorithm...
The base class for all undirected edges.
virtual void clear() final
resets the current junction tree strategy data structures
base class for all non-incremental triangulation methods
virtual const CliqueGraph & junctionTree() final
returns the junction tree computed
Size size() const noexcept
Returns the number of elements in the set.
value_type & insert(const Key &key, const Val &val)
Adds a new element (actually a copy of this element) into the hash table.
bool __has_junction_tree
a boolean indicating whether the junction tree has been constructed
Size NodeId
Type for node ids.
#define GUM_ERROR(type, msg)
An algorithm producing a junction given the elimination tree produced by a triangulation algorithm...