From 8b4228fa5656790e6a9b3aab1555af90286a96a9 Mon Sep 17 00:00:00 2001 From: cbeall3 Date: Wed, 19 Aug 2015 10:58:19 -0400 Subject: [PATCH] Make smart parameters public. Now easier to set, and it's sufficient for this to be const within the smart factor itself! --- gtsam/slam/SmartProjectionFactor.h | 12 +++++------- gtsam_unstable/slam/SmartStereoProjectionFactor.h | 13 ++++++------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/gtsam/slam/SmartProjectionFactor.h b/gtsam/slam/SmartProjectionFactor.h index 8fc8880e1..120b0bbce 100644 --- a/gtsam/slam/SmartProjectionFactor.h +++ b/gtsam/slam/SmartProjectionFactor.h @@ -44,23 +44,21 @@ enum DegeneracyMode { /* * Parameters for the smart projection factors */ -class GTSAM_EXPORT SmartProjectionParams { - -public: +struct GTSAM_EXPORT SmartProjectionParams { LinearizationMode linearizationMode; ///< How to linearize the factor DegeneracyMode degeneracyMode; ///< How to linearize the factor /// @name Parameters governing the triangulation /// @{ - mutable TriangulationParameters triangulation; - const double retriangulationThreshold; ///< threshold to decide whether to re-triangulate + TriangulationParameters triangulation; + double retriangulationThreshold; ///< threshold to decide whether to re-triangulate /// @} /// @name Parameters governing how triangulation result is treated /// @{ - const bool throwCheirality; ///< If true, re-throws Cheirality exceptions (default: false) - const bool verboseCheirality; ///< If true, prints text for Cheirality exceptions (default: false) + bool throwCheirality; ///< If true, re-throws Cheirality exceptions (default: false) + bool verboseCheirality; ///< If true, prints text for Cheirality exceptions (default: false) /// @} // Constructor diff --git a/gtsam_unstable/slam/SmartStereoProjectionFactor.h b/gtsam_unstable/slam/SmartStereoProjectionFactor.h index c0532e073..d3dca11e0 100644 --- a/gtsam_unstable/slam/SmartStereoProjectionFactor.h +++ b/gtsam_unstable/slam/SmartStereoProjectionFactor.h @@ -15,6 +15,7 @@ * @author Luca Carlone * @author Zsolt Kira * @author Frank Dellaert + * @author Chris Beall */ #pragma once @@ -47,23 +48,21 @@ enum DegeneracyMode { /* * Parameters for the smart stereo projection factors */ - class GTSAM_EXPORT SmartStereoProjectionParams { - - public: + struct GTSAM_EXPORT SmartStereoProjectionParams { LinearizationMode linearizationMode; ///< How to linearize the factor DegeneracyMode degeneracyMode; ///< How to linearize the factor /// @name Parameters governing the triangulation /// @{ - mutable TriangulationParameters triangulation; - const double retriangulationThreshold; ///< threshold to decide whether to re-triangulate + TriangulationParameters triangulation; + double retriangulationThreshold; ///< threshold to decide whether to re-triangulate /// @} /// @name Parameters governing how triangulation result is treated /// @{ - const bool throwCheirality; ///< If true, re-throws Cheirality exceptions (default: false) - const bool verboseCheirality; ///< If true, prints text for Cheirality exceptions (default: false) + bool throwCheirality; ///< If true, re-throws Cheirality exceptions (default: false) + bool verboseCheirality; ///< If true, prints text for Cheirality exceptions (default: false) /// @}