|
gtsam
|
Public Member Functions | |
| HybridSmoother (const std::optional< double > marginalThreshold={}) | |
| Constructor. | |
| const DiscreteValues & | fixedValues () const |
| Return fixed values: | |
| void | reInitialize (HybridBayesNet &&hybridBayesNet) |
| Re-initialize the smoother from a new hybrid Bayes Net. | |
| void | reInitialize (HybridBayesNet &hybridBayesNet) |
| Re-initialize the smoother from a new hybrid Bayes Net (non rvalue version). | |
| void | update (const HybridNonlinearFactorGraph &graph, const Values &initial, std::optional< size_t > maxNrLeaves={}, const std::optional< Ordering > givenOrdering={}) |
| Given new factors, perform an incremental update. | |
| Ordering | getOrdering (const HybridGaussianFactorGraph &factors, const KeySet &newFactorKeys) |
| Get an elimination ordering which eliminates continuous and then discrete. | |
| std::pair< HybridGaussianFactorGraph, HybridBayesNet > | addConditionals (const HybridGaussianFactorGraph &graph, const HybridBayesNet &hybridBayesNet) const |
| Add conditionals from previous timestep as part of liquefication. | |
| HybridGaussianConditional::shared_ptr | gaussianMixture (size_t index) const |
| Get the hybrid Gaussian conditional from the Bayes Net posterior at index. | |
| const HybridBayesNet & | hybridBayesNet () const |
| Return the Bayes Net posterior. | |
| HybridValues | optimize () const |
| Optimize the hybrid Bayes Net, taking into accound fixed values. | |
| void | relinearize (const std::optional< Ordering > givenOrdering={}) |
| Relinearize the nonlinear factor graph with the latest stored linearization point. | |
| Values | linearizationPoint () const |
| Return the current linearization point. | |
| HybridNonlinearFactorGraph | allFactors () const |
| Return all the recorded nonlinear factors. | |
| double | error (const HybridValues &x) const |
| Compute the linear error using the underlying solver for the explicitly provided discrete assignment. | |
| double | error (const VectorValues &x) const |
| Compute the linear error using the underlying solver. | |
|
inline |
Constructor.
| removeDeadModes | Flag indicating whether to remove dead modes. |
| marginalThreshold | The threshold above which a mode gets assigned a value and is considered "dead". 0.99 is a good starting value. |
| std::pair< HybridGaussianFactorGraph, HybridBayesNet > gtsam::HybridSmoother::addConditionals | ( | const HybridGaussianFactorGraph & | graph, |
| const HybridBayesNet & | hybridBayesNet ) const |
Add conditionals from previous timestep as part of liquefication.
| graph | The new factor graph for the current time step. |
| hybridBayesNet | The hybrid bayes net containing all conditionals so far. |
| ordering | The elimination ordering. |
| double gtsam::HybridSmoother::error | ( | const HybridValues & | x | ) | const |
Compute the linear error using the underlying solver for the explicitly provided discrete assignment.
| x | The vector and discrete values to compute the error for. |
| double gtsam::HybridSmoother::error | ( | const VectorValues & | x | ) | const |
Compute the linear error using the underlying solver.
The error is computed using the computed Most-Probable Explanation (MPE) of the discrete variables.
| x | The vector values to compute the error for. |
| HybridGaussianConditional::shared_ptr gtsam::HybridSmoother::gaussianMixture | ( | size_t | index | ) | const |
Get the hybrid Gaussian conditional from the Bayes Net posterior at index.
| index | Indexing value. |
| Ordering gtsam::HybridSmoother::getOrdering | ( | const HybridGaussianFactorGraph & | factors, |
| const KeySet & | newFactorKeys ) |
Get an elimination ordering which eliminates continuous and then discrete.
Expects factors to already have the necessary conditionals which were connected to the variables in the newly added factors. Those variables should be in newFactorKeys.
| factors | All the new factors and connected conditionals. |
| newFactorKeys | The keys/variables in the newly added factors. |
| void gtsam::HybridSmoother::relinearize | ( | const std::optional< Ordering > | givenOrdering = {} | ) |
Relinearize the nonlinear factor graph with the latest stored linearization point.
| givenOrdering | An optional elimination ordering. |
| void gtsam::HybridSmoother::update | ( | const HybridNonlinearFactorGraph & | graph, |
| const Values & | initial, | ||
| std::optional< size_t > | maxNrLeaves = {}, | ||
| const std::optional< Ordering > | givenOrdering = {} ) |
Given new factors, perform an incremental update.
The relevant densities in the hybridBayesNet will be added to the input graph (fragment), and then eliminated according to the ordering presented. The remaining factor graph contains hybrid Gaussian factors that are not connected to the variables in the ordering, or a single discrete factor on all discrete keys, plus all discrete factors in the original graph.
| graph | The new factors, should be linear only |
| maxNrLeaves | The maximum number of leaves in the new discrete factor, if applicable |
| givenOrdering | The (optional) ordering for elimination, only continuous variables are allowed |
Prune