![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
An algorithm producing a junction given the elimination tree produced by a triangulation algorithm. More...
#include <defaultJunctionTreeStrategy.h>
Public Member Functions | |
Constructors / Destructors | |
DefaultJunctionTreeStrategy () | |
default constructor More... | |
DefaultJunctionTreeStrategy (const DefaultJunctionTreeStrategy &from) | |
copy constructor More... | |
DefaultJunctionTreeStrategy (DefaultJunctionTreeStrategy &&from) | |
move constructor More... | |
virtual | ~DefaultJunctionTreeStrategy () |
destructor More... | |
virtual DefaultJunctionTreeStrategy * | newFactory () const final |
create a clone not assigned to any triangulation algorithm More... | |
virtual DefaultJunctionTreeStrategy * | copyFactory (StaticTriangulation *triangulation=nullptr) const final |
virtual copy constructor More... | |
Accessors / Modifiers | |
virtual bool | requiresFillIns () const final |
indicates whether the junction tree strategy needs fill-ins to work properly More... | |
virtual const CliqueGraph & | junctionTree () final |
returns the junction tree computed More... | |
virtual void | setTriangulation (StaticTriangulation *triangulation) final |
assigns the triangulation to the junction tree strategy More... | |
virtual const NodeProperty< NodeId > & | createdCliques () final |
returns, for each node, the clique of the junction tree which was created by its deletion More... | |
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 the triangulation process More... | |
virtual void | clear () final |
resets the current junction tree strategy data structures More... | |
Accessors / Modifiers | |
virtual void | moveTriangulation (StaticTriangulation *triangulation) |
assigns a new triangulation to the junction tree strategy during a move construction More... | |
Protected Attributes | |
StaticTriangulation * | triangulation_ {nullptr} |
the triangulation to which the junction tree is associated More... | |
An algorithm producing a junction given the elimination tree produced by a triangulation algorithm.
Definition at line 43 of file defaultJunctionTreeStrategy.h.
gum::DefaultJunctionTreeStrategy::DefaultJunctionTreeStrategy | ( | ) |
default constructor
Definition at line 38 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
gum::DefaultJunctionTreeStrategy::DefaultJunctionTreeStrategy | ( | const DefaultJunctionTreeStrategy & | from | ) |
copy constructor
Definition at line 43 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
gum::DefaultJunctionTreeStrategy::DefaultJunctionTreeStrategy | ( | DefaultJunctionTreeStrategy && | from | ) |
move constructor
Definition at line 52 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
virtual |
destructor
Definition at line 60 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
private |
computes a junction tree from an elimination tree
Definition at line 139 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtual |
resets the current junction tree strategy data structures
Implements gum::JunctionTreeStrategy.
Definition at line 132 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtual |
virtual copy constructor
triangulation | if triangulation is different from nullptr, this becomes the new triangulation algorithm associated with the junction tree strategy |
Implements gum::JunctionTreeStrategy.
Definition at line 72 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
returns the Id of the clique of the junction tree created by the elimination of a given node during the triangulation process
id | the id of the node in the original undirected graph whose created clique's id is looked for |
UndefinedElement | is raised if no triangulation has been assigned to the DefaultJunctionTreeStrategy |
Implements gum::JunctionTreeStrategy.
Definition at line 116 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtual |
returns, for each node, the clique of the junction tree which was created by its deletion
UndefinedElement | is raised if no triangulation has been assigned to the DefaultJunctionTreeStrategy |
Implements gum::JunctionTreeStrategy.
Definition at line 107 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtual |
returns the junction tree computed
The idea behind this method is that the JunctionTreeStrategy asks its assigned triangulation (see method setTriangulation) all the data it needs to compute correctly the junction tree. For instance, it may asks for a triangulated graph or an elimination tree, or even the order of elimination of the nodes, etc. All these data are available from the triangulation class. Knowing these data, the junctionTreeStrategy computes and returns a junction tree corresponding to the triangulated graph.
UndefinedElement | is raised if no triangulation has been assigned to the DefaultJunctionTreeStrategy |
Implements gum::JunctionTreeStrategy.
Definition at line 124 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
virtualinherited |
assigns a new triangulation to the junction tree strategy during a move construction
Definition at line 60 of file junctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtual |
create a clone not assigned to any triangulation algorithm
Implements gum::JunctionTreeStrategy.
Definition at line 66 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
finalvirtual |
indicates whether the junction tree strategy needs fill-ins to work properly
If the junctionTreeStrategy needs fill-ins to work properly, its assigned triangulation instance (see method setTriangulation) will be commited to compute them.
Implements gum::JunctionTreeStrategy.
Definition at line 98 of file defaultJunctionTreeStrategy.cpp.
|
finalvirtual |
assigns the triangulation to the junction tree strategy
the | triangulation whose resulting cliques will be used to construct the junction tree |
Implements gum::JunctionTreeStrategy.
Definition at line 101 of file defaultJunctionTreeStrategy.cpp.
References gum::Set< Key, Alloc >::emplace().
|
private |
a boolean indicating whether the junction tree has been constructed
Definition at line 129 of file defaultJunctionTreeStrategy.h.
|
private |
the junction tree computed by the algorithm
Definition at line 132 of file defaultJunctionTreeStrategy.h.
|
private |
indicates which clique of the junction tree was created by the elimination of a given node (the key of the table)
Definition at line 136 of file defaultJunctionTreeStrategy.h.
|
protectedinherited |
the triangulation to which the junction tree is associated
Definition at line 117 of file junctionTreeStrategy.h.