Adress review comments
							parent
							
								
									26dd94bdaf
								
							
						
					
					
						commit
						9dd1f8ffaf
					
				|  | @ -161,7 +161,7 @@ class GTSAM_EXPORT GncParams { | |||
|       std::cout << "knownInliers: " << knownInliers[i] << "\n"; | ||||
|     for (size_t i = 0; i < knownOutliers.size(); i++) | ||||
|       std::cout << "knownOutliers: " << knownOutliers[i] << "\n"; | ||||
|     baseOptimizerParams.print(str); | ||||
|     baseOptimizerParams.print("Base optimizer params: "); | ||||
|   } | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -571,7 +571,7 @@ virtual class GncParams { | |||
|   void setVerbosityGNC(const This::Verbosity value); | ||||
|   void setKnownInliers(const std::vector<size_t>& knownIn); | ||||
|   void setKnownOutliers(const std::vector<size_t>& knownOut); | ||||
|   void print(const string& str = "") const; | ||||
|   void print(const string& str = "GncParams: ") const; | ||||
|    | ||||
|   enum Verbosity { | ||||
|     SILENT, | ||||
|  |  | |||
|  | @ -91,8 +91,19 @@ class TestScenario(GtsamTestCase): | |||
|             base_params.setMaxIterations(base_max_iters) | ||||
|             params = GncLMParams(base_params) | ||||
|             self.assertEqual(params.baseOptimizerParams.getMaxIterations(), base_max_iters) | ||||
| 
 | ||||
|         # Test printing | ||||
|         str(params) | ||||
|         params_str = str(params) | ||||
|         for s in ( | ||||
|             "lossType", | ||||
|             "maxIterations", | ||||
|             "muStep", | ||||
|             "relativeCostTol", | ||||
|             "weightsTol", | ||||
|             "verbosity", | ||||
|         ): | ||||
|             self.assertTrue(s in params_str) | ||||
| 
 | ||||
|         # Test each parameter | ||||
|         for loss_type in (GncLossType.TLS, GncLossType.GM): | ||||
|             params.setLossType(loss_type)  # Default is TLS | ||||
|  | @ -121,6 +132,7 @@ class TestScenario(GtsamTestCase): | |||
|             params.setKnownInliers(out) | ||||
|             self.assertEqual(params.knownInliers, out) | ||||
|             params.knownInliers = [] | ||||
| 
 | ||||
|         # Test optimizer params | ||||
|         optimizer = GncLMOptimizer(self.fg, self.initial_values, params) | ||||
|         for ict_factor in (0.9, 1.1): | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue