|
10 | 10 |
|
11 | 11 | namespace gtsam { |
12 | 12 |
|
13 | | -// Actually a FastList<Key> |
14 | 13 | #include <gtsam/inference/Key.h> |
15 | 14 |
|
16 | 15 | const KeyFormatter DefaultKeyFormatter; |
17 | 16 |
|
| 17 | +// Actually a FastList<Key> |
18 | 18 | class KeyList { |
19 | 19 | KeyList(); |
20 | 20 | KeyList(const gtsam::KeyList& other); |
@@ -1284,31 +1284,26 @@ class SymbolicBayesTree { |
1284 | 1284 | gtsam::SymbolicBayesNet* jointBayesNet(size_t key1, size_t key2) const; |
1285 | 1285 | }; |
1286 | 1286 |
|
1287 | | -// class SymbolicBayesTreeClique { |
1288 | | -// SymbolicBayesTreeClique(); |
1289 | | -// SymbolicBayesTreeClique(CONDITIONAL* conditional); |
1290 | | -// SymbolicBayesTreeClique(const pair<typename ConditionalType::shared_ptr, typename ConditionalType::FactorType::shared_ptr>& result) : Base(result) {} |
1291 | | -// |
1292 | | -// bool equals(const This& other, double tol) const; |
1293 | | -// void print(string s = "", |
1294 | | -// const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter) const; |
1295 | | -// void printTree() const; // Default indent of "" |
1296 | | -// void printTree(string indent) const; |
1297 | | -// size_t numCachedSeparatorMarginals() const; |
1298 | | -// |
1299 | | -// CONDITIONAL* conditional() const; |
1300 | | -// bool isRoot() const; |
1301 | | -// size_t treeSize() const; |
1302 | | -// const std::list<derived_ptr>& children() const { return children_; } |
1303 | | -// derived_ptr parent() const { return parent_.lock(); } |
1304 | | -// |
| 1287 | +class SymbolicBayesTreeClique { |
| 1288 | + SymbolicBayesTreeClique(); |
| 1289 | + // SymbolicBayesTreeClique(gtsam::sharedConditional* conditional); |
| 1290 | + |
| 1291 | + bool equals(const gtsam::SymbolicBayesTreeClique& other, double tol) const; |
| 1292 | + void print(string s = "", |
| 1293 | + const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter) const; |
| 1294 | + size_t numCachedSeparatorMarginals() const; |
| 1295 | + // gtsam::sharedConditional* conditional() const; |
| 1296 | + bool isRoot() const; |
| 1297 | + size_t treeSize() const; |
| 1298 | + gtsam::SymbolicBayesTreeClique* parent() const; |
| 1299 | + |
1305 | 1300 | // // TODO: need wrapped versions graphs, BayesNet |
1306 | 1301 | // BayesNet<ConditionalType> shortcut(derived_ptr root, Eliminate function) const; |
1307 | 1302 | // FactorGraph<FactorType> marginal(derived_ptr root, Eliminate function) const; |
1308 | 1303 | // FactorGraph<FactorType> joint(derived_ptr C2, derived_ptr root, Eliminate function) const; |
1309 | 1304 | // |
1310 | | -// void deleteCachedShortcuts(); |
1311 | | -// }; |
| 1305 | + void deleteCachedShortcuts(); |
| 1306 | +}; |
1312 | 1307 |
|
1313 | 1308 | #include <gtsam/inference/VariableIndex.h> |
1314 | 1309 | class VariableIndex { |
@@ -1554,7 +1549,7 @@ class Sampler { |
1554 | 1549 |
|
1555 | 1550 | #include <gtsam/linear/VectorValues.h> |
1556 | 1551 | class VectorValues { |
1557 | | - //Constructors |
| 1552 | + //Constructors |
1558 | 1553 | VectorValues(); |
1559 | 1554 | VectorValues(const gtsam::VectorValues& other); |
1560 | 1555 |
|
@@ -2160,7 +2155,7 @@ virtual class NonlinearFactor { |
2160 | 2155 | bool active(const gtsam::Values& c) const; |
2161 | 2156 | gtsam::GaussianFactor* linearize(const gtsam::Values& c) const; |
2162 | 2157 | gtsam::NonlinearFactor* clone() const; |
2163 | | - // gtsam::NonlinearFactor* rekey(const gtsam::KeyVector& newKeys) const; //TODO: Conversion from KeyVector to std::vector does not happen |
| 2158 | + gtsam::NonlinearFactor* rekey(const gtsam::KeyVector& newKeys) const; |
2164 | 2159 | }; |
2165 | 2160 |
|
2166 | 2161 | #include <gtsam/nonlinear/NonlinearFactor.h> |
@@ -2778,11 +2773,17 @@ virtual class GeneralSFMFactor2 : gtsam::NoiseModelFactor { |
2778 | 2773 | }; |
2779 | 2774 |
|
2780 | 2775 | #include <gtsam/slam/SmartProjectionFactor.h> |
| 2776 | + |
| 2777 | +/// Linearization mode: what factor to linearize to |
| 2778 | +enum LinearizationMode { HESSIAN, IMPLICIT_SCHUR, JACOBIAN_Q, JACOBIAN_SVD }; |
| 2779 | + |
| 2780 | +/// How to manage degeneracy |
| 2781 | +enum DegeneracyMode { IGNORE_DEGENERACY, ZERO_ON_DEGENERACY, HANDLE_INFINITY }; |
| 2782 | + |
2781 | 2783 | class SmartProjectionParams { |
2782 | 2784 | SmartProjectionParams(); |
2783 | | - // TODO(frank): make these work: |
2784 | | - // void setLinearizationMode(LinearizationMode linMode); |
2785 | | - // void setDegeneracyMode(DegeneracyMode degMode); |
| 2785 | + void setLinearizationMode(gtsam::LinearizationMode linMode); |
| 2786 | + void setDegeneracyMode(gtsam::DegeneracyMode degMode); |
2786 | 2787 | void setRankTolerance(double rankTol); |
2787 | 2788 | void setEnableEPI(bool enableEPI); |
2788 | 2789 | void setLandmarkDistanceThreshold(bool landmarkDistanceThreshold); |
|
0 commit comments