From 7074ca2005d1ad59b83cc1a5c14e4c9ffca31040 Mon Sep 17 00:00:00 2001 From: p-zach Date: Thu, 10 Apr 2025 10:43:24 -0400 Subject: [PATCH] Summarize, add to myst --- gtsam/inference/inference.md | 36 ++++++++++++++++++++++++++++++++++++ myst.yml | 3 +++ 2 files changed, 39 insertions(+) create mode 100644 gtsam/inference/inference.md diff --git a/gtsam/inference/inference.md b/gtsam/inference/inference.md new file mode 100644 index 000000000..157b403c3 --- /dev/null +++ b/gtsam/inference/inference.md @@ -0,0 +1,36 @@ +# Inference + +The `inference` module provides the foundational classes and algorithms for probabilistic graphical models in GTSAM, focusing on variable elimination and the resulting structures like Bayes Nets and Bayes Trees. + +## Core Concepts + +- [Key](doc/Key.ipynb): Base type (`uint64_t`) for uniquely identifying variables. +- [Symbol](doc/Symbol.ipynb): A Key type encoding a character and an index (e.g., `x0`). +- [LabeledSymbol](doc/LabeledSymbol.ipynb): A `Symbol` variant with an additional label character, useful for multi-robot scenarios (e.g., `xA0`). +- [EdgeKey](doc/EdgeKey.ipynb): A Key type encoding a pair of 32-bit integers. +- [Factor](doc/Factor.ipynb): Abstract base class for all factors (relationships between variables). +- [FactorGraph](doc/FactorGraph.ipynb): Base class representing a collection of factors. +- [Conditional](doc/Conditional.ipynb): Abstract base class for conditional distributions/densities resulting from elimination ( $P(\text{Frontals} | \text{Parents})$ ). + +## Elimination Algorithms & Control + +- [Ordering](doc/Ordering.ipynb): Specifies the order in which variables are eliminated, crucial for efficiency. +- [VariableIndex](doc/VariableIndex.ipynb): Maps variables to the factors they appear in, used for efficient elimination ordering and construction. +- [EliminateableFactorGraph](https://github.com/borglab/gtsam/blob/develop/gtsam/inference/EliminateableFactorGraph.h): A mixin class providing `eliminateSequential` and `eliminateMultifrontal` methods to concrete factor graph types (like `GaussianFactorGraph`, `SymbolicFactorGraph`). + +## Elimination Results & Structures + +- [BayesNet](doc/BayesNet.ipynb): Represents the result of sequential variable elimination as a directed acyclic graph (DAG) of conditionals. +- [EliminationTree](doc/EliminationTree.ipynb): Tree structure representing the dependencies and computations during sequential elimination. +- [ClusterTree](doc/ClusterTree.ipynb): Base class for tree structures where nodes are clusters of factors (e.g., JunctionTree). +- [JunctionTree](doc/JunctionTree.ipynb): A cluster tree representing the cliques formed during multifrontal elimination, holding the factors before they are eliminated into conditionals. +- [BayesTreeCliqueBase](https://github.com/borglab/gtsam/blob/develop/gtsam/inference/BayesTreeCliqueBase.h): Abstract base class for the nodes (cliques) within a BayesTree. +- [BayesTree](doc/BayesTree.ipynb): Represents the result of multifrontal variable elimination as a tree of cliques, where each clique contains the conditional $P(\text{Frontals} | \text{Separator})$. + +## Incremental Inference + +- [ISAM](doc/ISAM.ipynb): Incremental Smoothing and Mapping algorithm based on updating a BayesTree (original version, often superseded by ISAM2 in `nonlinear`). + +## Visualization + +- [DotWriter](doc/DotWriter.ipynb): Helper class to customize the generation of Graphviz `.dot` files for visualizing graphs and trees. \ No newline at end of file diff --git a/myst.yml b/myst.yml index de5278d85..5db7be6ff 100644 --- a/myst.yml +++ b/myst.yml @@ -13,6 +13,9 @@ project: - file: ./gtsam/geometry/geometry.md children: - pattern: ./gtsam/geometry/doc/* + - file: ./gtsam/inference/inference.md + children: + - pattern: ./gtsam/inference/doc/* - file: ./gtsam/nonlinear/nonlinear.md children: - pattern: ./gtsam/nonlinear/doc/*