| 
									
										
										
										
											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     InfeasibleOrUnboundedProblem.h | 
					
						
							|  |  |  |  * @brief    Throw when the problem is either infeasible or unbounded | 
					
						
							|  |  |  |  * @author   Ivan Dario Jimenez | 
					
						
							|  |  |  |  * @date     1/24/16 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-11 22:39:48 +08:00
										 |  |  | #pragma once
 | 
					
						
							| 
									
										
										
										
											2016-06-17 11:49:14 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-25 08:40:55 +08:00
										 |  |  | namespace gtsam { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class InfeasibleOrUnboundedProblem: public ThreadsafeException< | 
					
						
							|  |  |  |     InfeasibleOrUnboundedProblem> { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |   InfeasibleOrUnboundedProblem() { | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2021-01-29 12:02:13 +08:00
										 |  |  |   ~InfeasibleOrUnboundedProblem() noexcept override { | 
					
						
							| 
									
										
										
										
											2016-01-25 08:40:55 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-26 15:57:54 +08:00
										 |  |  |   const char* what() const noexcept override { | 
					
						
							| 
									
										
										
										
											2023-02-13 09:55:19 +08:00
										 |  |  |     if (description_->empty()) | 
					
						
							| 
									
										
										
										
											2016-01-25 08:40:55 +08:00
										 |  |  |       description_ = "The problem is either infeasible or unbounded.\n"; | 
					
						
							| 
									
										
										
										
											2023-02-13 09:55:19 +08:00
										 |  |  |     return description_->c_str(); | 
					
						
							| 
									
										
										
										
											2016-01-25 08:40:55 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | } |