![]() |
aGrUM
0.16.0
|
#include <binaryJoinTreeConverterDefault.h>
Public Member Functions | |
Constructors / Destructors | |
BinaryJoinTreeConverterDefault () | |
default constructor More... | |
virtual | ~BinaryJoinTreeConverterDefault () |
destructor More... | |
Accessors/Modifiers | |
CliqueGraph | convert (const CliqueGraph &JT, const NodeProperty< Size > &domain_sizes, const NodeSet &roots) |
returns a binary join tree corresponding to clique graph JT More... | |
const NodeSet & | roots () const |
returns all the roots considered for all the connected components More... | |
Definition at line 35 of file binaryJoinTreeConverterDefault.h.
gum::BinaryJoinTreeConverterDefault::BinaryJoinTreeConverterDefault | ( | ) |
default constructor
Definition at line 37 of file binaryJoinTreeConverterDefault.cpp.
|
virtual |
destructor
Definition at line 43 of file binaryJoinTreeConverterDefault.cpp.
|
private |
forbid copy constructor
|
private |
returns the domain size of the union of two cliques
Definition at line 82 of file binaryJoinTreeConverterDefault.cpp.
Referenced by __convertClique().
|
private |
convert a clique and its adjacent cliques into a binary join tree
Definition at line 101 of file binaryJoinTreeConverterDefault.cpp.
References __combinedSize(), gum::CliqueGraph::addEdge(), gum::CliqueGraph::addNode(), gum::PriorityQueueImplementation< Val, Priority, Cmp, Alloc, std::is_scalar< Val >::value >::erase(), gum::CliqueGraph::eraseEdge(), gum::PriorityQueueImplementation< Val, Priority, Cmp, Alloc, std::is_scalar< Val >::value >::insert(), gum::EdgeGraphPart::neighbours(), gum::PriorityQueueImplementation< Val, Priority, Cmp, Alloc, std::is_scalar< Val >::value >::pop(), gum::CliqueGraph::separator(), gum::PriorityQueueImplementation< Val, Priority, Cmp, Alloc, std::is_scalar< Val >::value >::setPriority(), and gum::Set< Key, Alloc >::size().
Referenced by __convertConnectedComponent().
|
private |
convert a whole connected component into a binary join tree
Definition at line 222 of file binaryJoinTreeConverterDefault.cpp.
References __convertClique(), and gum::EdgeGraphPart::neighbours().
Referenced by convert().
|
private |
a function used to mark the nodes belonging to a given connected component
Definition at line 49 of file binaryJoinTreeConverterDefault.cpp.
References gum::EdgeGraphPart::neighbours(), and gum::NodeGraphPart::sizeNodes().
Referenced by convert().
CliqueGraph gum::BinaryJoinTreeConverterDefault::convert | ( | const CliqueGraph & | JT, |
const NodeProperty< Size > & | domain_sizes, | ||
const NodeSet & | roots | ||
) |
returns a binary join tree corresponding to clique graph JT
computes the binary join tree
This method creates and returns a new binary join tree compatible with that passed in argument (JT) and optimized for inference. As such, this requires knowing the join tree to be converted (of course), but also which roots will be used by the collect/diffusion inference engine and the domain size of the variables contained in the cliques of JT (to optimize the combination of the potentials contained in the cliques.
InvalidNode | exception is thrown if some roots do not belong to JT or if several roots belong to the same connected component. |
Definition at line 244 of file binaryJoinTreeConverterDefault.cpp.
References __convertConnectedComponent(), __markConnectedComponent(), __roots, GUM_ERROR, gum::NodeGraphPart::nodesProperty(), and gum::NodeGraphPart::sizeNodes().
|
private |
forbid copy operator
const NodeSet & gum::BinaryJoinTreeConverterDefault::roots | ( | ) | const |
returns all the roots considered for all the connected components
Definition at line 98 of file binaryJoinTreeConverterDefault.cpp.
References __roots.
|
private |
the new roots that have been created to compute the last query
Definition at line 79 of file binaryJoinTreeConverterDefault.h.