The base module provides fundamental data structures, utilities, and mathematical operations that form the foundation of GTSAM. Here are the key header files:
Core Mathematical Concepts¶
Utilities to define group, manifold, and Lie group classes, as well as concept checks for them.
Manifold.h - Defines the concept for differentiable manifolds with retract/local operations. See Manifold docs.
Lie.h - Implements the Lie group concept combining group operations with manifold structure. See LieGroup docs.
MatrixLieGroup.h - Base class for matrix Lie groups (SO(n), SE(n), SL(n), etc.) with Hat/Vee operators. See MatrixLieGroup docs.
And, less common:
Group.h - Defines the group concept with identity, inverse, and composition operations. See Group docs.
VectorSpace.h - Defines the vector space concept. See VectorSpace docs.
lieProxies.h - Proxy functions for testing
Constructed Lie Groups¶
These templates build larger Lie groups from existing group types while preserving GTSAM’s traits, tangent-vector ordering, and optional-Jacobian conventions:
ProductLieGroup.h constructs independent direct products
G × H. See the ProductLieGroup guide for its componentwise operations, adjoints, and dynamic-dimension behavior.SemidirectLieGroup.h constructs action-coupled products
G ⋉ H. See the SemidirectLieGroup guide for action requirements, matrix-function kernels, and coupled Jacobians.TangentLieGroup.h constructs the tangent group
TG = G ⋉ 𝔤, whereGacts on its algebra through the adjoint action. See the TangentLieGroup guide for its structured Jacobians, recursive use, and optimized SO(3) specialization.
Linear Algebra¶
Linear algebra operations optimized for robotics applications. Vector and Matrix are essentially typedefs and wrappers for Eigen:
Vector.h - Vector operations and mathematical functions
Matrix.h - Essential matrix operations and linear algebra utilities built on Eigen
cholesky.h - Cholesky decomposition algorithms for solving linear systems
These are used in Jacobian and Hessian factors:
VerticalBlockMatrix.h - Specialized block matrix structure for efficient sparse operations
SymmetricBlockMatrix.h - Symmetric block matrix implementation for optimization problems
Jacobians¶
numericalDerivative.h - Numerical differentiation utilities for automatic derivative computation
OptionalJacobian.h - Optional Jacobian computation wrapper for optimization efficiency
Container and Data Structures¶
High-performance container types (FastSet, FastMap, etc.) optimized for GTSAM (unclear whether still relevant for recent c++ compilers)
DSFMap.h - Disjoint Set Forest implementation using maps for union-find operations
DSFVector.h - Disjoint Set Forest implementation using vectors for better performance
TreeTraversal.h - Tree traversal algorithms and utilities for factor graphs
ConcurrentMap.h - Thread-safe concurrent map implementation
Debugging and Development Tools¶
debug.h - Debugging utilities, assertion macros, and conditional compilation flags
timing.h - Performance timing and profiling utilities for benchmarking
TestableAssertions.h - Assertion macros for unit testing with tolerance checking
chartTesting.h - Utilities for testing manifold chart operations
Sampling and Statistics¶
WeightedSampler.h - Weighted random sampling utilities for Monte Carlo methods
sampler.h - General sampling utilities and random number generation
Graph Algorithms¶
Kruskal.h - Kruskal’s algorithm for minimum spanning trees in factor graphs
BTree.h - Balanced tree implementation for efficient storage and retrieval
Type System and Traits¶
types.h - Common type definitions, aliases, and forward declarations
concepts.h - C++ concept definitions for type checking and constraints
Testable.h - Base class and concept for objects that can be tested for equality
Serialization Support¶
SerializationBase.h - Base serialization functionality for saving/loading objects
StdOptionalSerialization.h - Serialization support for std::optional types
Memory Management and Performance¶
utilities.h - General utility functions, memory management helpers, and common operations
FastDefaultAllocator.h - Custom allocator for improved performance in critical paths
Value.h - Type-erased value wrapper for heterogeneous containers
Template Metaprogramming¶
treeTraversal
-inst.h - Template instantiations for tree traversal algorithms concepts.h - SFINAE utilities and type trait helpers