| 
									
										
										
										
											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() { | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   virtual ~InfeasibleInitialValues() throw () { | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   virtual const char *what() const throw () { | 
					
						
							|  |  |  |     if (description_.empty()) | 
					
						
							|  |  |  |       description_ = | 
					
						
							|  |  |  |           "An infeasible initial value was provided for the solver.\n"; | 
					
						
							|  |  |  |     return description_.c_str(); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |   mutable std::string description_; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | } |