| 
									
										
										
										
											2009-12-27 06:48:41 +08:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @file    Errors.h | 
					
						
							|  |  |  |  * @brief   vector of errors | 
					
						
							|  |  |  |  * @author  Frank Dellaert | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // \callgraph
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <vector>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "Testable.h"
 | 
					
						
							|  |  |  | #include "Vector.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace gtsam { | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  |   /** vector of errors */ | 
					
						
							| 
									
										
										
										
											2009-12-31 01:13:36 +08:00
										 |  |  |   class Errors : public std::list<Vector>, public Testable<Errors> { | 
					
						
							| 
									
										
										
										
											2009-12-27 06:48:41 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   public: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   	/** print */ | 
					
						
							|  |  |  |     void print(const std::string& s = "Errors") const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** equals, for unit testing */ | 
					
						
							|  |  |  |     bool equals(const Errors& expected, double tol=1e-9) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-31 18:27:16 +08:00
										 |  |  |     /** subtraction */ | 
					
						
							|  |  |  |     Errors operator-(const Errors& b) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-27 06:48:41 +08:00
										 |  |  |   }; // Errors
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-28 16:15:09 +08:00
										 |  |  |   /**
 | 
					
						
							|  |  |  |    * dot product | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   double dot(const Errors& a, const Errors& b); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-11 16:32:59 +08:00
										 |  |  |   /** print with optional string */ | 
					
						
							|  |  |  |   void print(const Errors& a, const std::string& s = "Error"); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-27 06:48:41 +08:00
										 |  |  | } // gtsam
 |