Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

DiscreteJunctionTree

A junction tree is an internal data structure used during multifrontal elimination. DiscreteJunctionTree clusters an elimination tree into a forest of cliques suitable for multifrontal discrete inference. Python also exposes its nested cluster type as DiscreteCluster for inspecting frontal keys, attached factors, and child clusters.

Open In Colab

From factor graph to junction tree

The junction tree is constructed from a DiscreteEliminationTree, so the graph and variable ordering remain explicit.

DiscreteJunctionTree

nrRoots() reports the number of connected components. Indexing the tree selects a root DiscreteCluster, while print() renders the complete cluster hierarchy. A disconnected factor graph can therefore produce more than one root.

DiscreteCluster

Each cluster exposes orderedFrontalKeys, the factors assigned to the clique, indexing for child clusters, nrChildren(), and print(). Clusters are obtained from a junction tree; they are not intended to be assembled independently in Python.

Source

DiscreteJunctionTree.h

AI assistance caveat

AI was used to help draft this documentation, and inaccuracies could be present.