| 
									
										
										
										
											2016-06-17 11:49:14 +08:00
										 |  |  | /* ----------------------------------------------------------------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * GTSAM Copyright 2010, Georgia Tech Research Corporation, | 
					
						
							|  |  |  |  * Atlanta, Georgia 30332-0415 | 
					
						
							|  |  |  |  * All Rights Reserved | 
					
						
							|  |  |  |  * Authors: Frank Dellaert, et al. (see THANKS for the full author list) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * See LICENSE for the license information | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * -------------------------------------------------------------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-25 08:40:55 +08:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @file InfeasibleInitialValues.h | 
					
						
							|  |  |  |  * @brief Exception thrown when given Infeasible Initial Values. | 
					
						
							|  |  |  |  * @date jan 24, 2015 | 
					
						
							|  |  |  |  * @author Duy-Nguyen Ta | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace gtsam { | 
					
						
							|  |  |  | /* ************************************************************************* */ | 
					
						
							| 
									
										
										
										
											2016-01-26 08:24:37 +08:00
										 |  |  | /** An exception indicating that the provided initial value is infeasible
 | 
					
						
							| 
									
										
										
										
											2016-02-03 00:03:53 +08:00
										 |  |  |  * Also used to inzdicatethat the noise model dimension passed into a | 
					
						
							| 
									
										
										
										
											2016-01-26 08:24:37 +08:00
										 |  |  |  * JacobianFactor has a different dimensionality than the factor. */ | 
					
						
							| 
									
										
										
										
											2016-01-25 08:40:55 +08:00
										 |  |  | class InfeasibleInitialValues: public ThreadsafeException< | 
					
						
							|  |  |  |     InfeasibleInitialValues> { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |   InfeasibleInitialValues() { | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-26 15:57:54 +08:00
										 |  |  |   virtual ~InfeasibleInitialValues() noexcept { | 
					
						
							| 
									
										
										
										
											2016-01-25 08:40:55 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-26 15:57:54 +08:00
										 |  |  |   const char *what() const noexcept override { | 
					
						
							| 
									
										
										
										
											2016-01-25 08:40:55 +08:00
										 |  |  |     if (description_.empty()) | 
					
						
							|  |  |  |       description_ = | 
					
						
							|  |  |  |           "An infeasible initial value was provided for the solver.\n"; | 
					
						
							|  |  |  |     return description_.c_str(); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |   mutable std::string description_; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | } |