| 
									
										
										
										
											2015-09-19 10:38:08 +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 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * -------------------------------------------------------------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  *  @file  Event | 
					
						
							|  |  |  |  *  @brief Space-time event | 
					
						
							|  |  |  |  *  @author Frank Dellaert | 
					
						
							|  |  |  |  *  @author Jay Chakravarty | 
					
						
							|  |  |  |  *  @date December 2014 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <gtsam_unstable/geometry/Event.h>
 | 
					
						
							| 
									
										
										
										
											2016-11-02 03:11:57 +08:00
										 |  |  | #include <iostream>
 | 
					
						
							| 
									
										
										
										
											2015-09-19 10:38:08 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace gtsam { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-02 03:11:57 +08:00
										 |  |  | /* ************************************************************************* */ | 
					
						
							|  |  |  | void Event::print(const std::string& s) const { | 
					
						
							| 
									
										
										
										
											2020-03-19 03:44:45 +08:00
										 |  |  |   std::cout << s << "{'time':" << time_ | 
					
						
							|  |  |  |             << ", 'location': " << location_.transpose() << "}"; | 
					
						
							| 
									
										
										
										
											2016-11-02 03:11:57 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* ************************************************************************* */ | 
					
						
							|  |  |  | bool Event::equals(const Event& other, double tol) const { | 
					
						
							| 
									
										
										
										
											2020-03-19 03:44:45 +08:00
										 |  |  |   return std::abs(time_ - other.time_) < tol && | 
					
						
							|  |  |  |          traits<Point3>::Equals(location_, other.location_, tol); | 
					
						
							| 
									
										
										
										
											2016-11-02 03:11:57 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* ************************************************************************* */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-19 03:44:45 +08:00
										 |  |  | }  // namespace gtsam
 |