| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  | class Ordering { | 
					
						
							|  |  |  |   Ordering(); | 
					
						
							|  |  |  |   void push_back(string s); | 
					
						
							|  |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-12-12 05:34:08 +08:00
										 |  |  |   void unique (); | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class SymbolicFactor{ | 
					
						
							| 
									
										
										
										
											2009-11-24 03:45:09 +08:00
										 |  |  | 	SymbolicFactor(const Ordering& keys); | 
					
						
							|  |  |  | 	void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  | class VectorConfig { | 
					
						
							|  |  |  |   VectorConfig(); | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  |   Vector get(string name) const; | 
					
						
							|  |  |  |   bool contains(string name) const; | 
					
						
							|  |  |  |   size_t size() const; | 
					
						
							|  |  |  |   void insert(string name, Vector val); | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   bool equals(const VectorConfig& expected, double tol) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  |   void clear(); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  | class GaussianFactorSet { | 
					
						
							|  |  |  |   GaussianFactorSet(); | 
					
						
							|  |  |  |   void push_back(GaussianFactor* factor); | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  | class GaussianFactor { | 
					
						
							|  |  |  |   GaussianFactor(string key1, | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 	       Matrix A1, | 
					
						
							| 
									
										
										
										
											2009-11-05 11:26:04 +08:00
										 |  |  | 	       Vector b_in, | 
					
						
							|  |  |  | 	       double sigma); | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  |   GaussianFactor(string key1, | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 	       Matrix A1, | 
					
						
							|  |  |  | 	       string key2, | 
					
						
							|  |  |  | 	       Matrix A2, | 
					
						
							| 
									
										
										
										
											2009-11-05 11:26:04 +08:00
										 |  |  | 	       Vector b_in, | 
					
						
							|  |  |  | 	       double sigma); | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  |   GaussianFactor(string key1, | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 	       Matrix A1, | 
					
						
							|  |  |  | 	       string key2, | 
					
						
							|  |  |  | 	       Matrix A2, | 
					
						
							|  |  |  | 	       string key3, | 
					
						
							|  |  |  | 	       Matrix A3, | 
					
						
							| 
									
										
										
										
											2009-11-05 11:26:04 +08:00
										 |  |  | 	       Vector b_in, | 
					
						
							|  |  |  | 	       double sigma); | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  |   bool empty() const; | 
					
						
							|  |  |  |   Vector get_b() const; | 
					
						
							|  |  |  |   Matrix get_A(string key) const; | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   double error(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  |   bool involves(string key) const; | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  |   bool equals(const GaussianFactor& lf, double tol) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  |   pair<Matrix,Vector> matrix(const Ordering& ordering) const; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-13 00:41:18 +08:00
										 |  |  | class GaussianConditional { | 
					
						
							|  |  |  |   GaussianConditional(); | 
					
						
							|  |  |  |   GaussianConditional(string key, | 
					
						
							| 
									
										
										
										
											2009-11-05 11:26:04 +08:00
										 |  |  |   		    Vector d, | 
					
						
							|  |  |  | 		      Matrix R, | 
					
						
							| 
									
										
										
										
											2009-11-11 15:14:13 +08:00
										 |  |  | 		      Vector sigmas); | 
					
						
							| 
									
										
										
										
											2009-11-13 00:41:18 +08:00
										 |  |  |   GaussianConditional(string key, | 
					
						
							| 
									
										
										
										
											2009-11-05 11:26:04 +08:00
										 |  |  |   		    Vector d, | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 		      Matrix R, | 
					
						
							|  |  |  | 		      string name1, | 
					
						
							| 
									
										
										
										
											2009-11-05 11:26:04 +08:00
										 |  |  | 		      Matrix S, | 
					
						
							| 
									
										
										
										
											2009-11-11 15:14:13 +08:00
										 |  |  | 		      Vector sigmas); | 
					
						
							| 
									
										
										
										
											2009-11-13 00:41:18 +08:00
										 |  |  |   GaussianConditional(string key, | 
					
						
							| 
									
										
										
										
											2009-11-05 11:26:04 +08:00
										 |  |  |   		    Vector d, | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 		      Matrix R, | 
					
						
							|  |  |  | 		      string name1, | 
					
						
							|  |  |  | 		      Matrix S, | 
					
						
							|  |  |  | 		      string name2, | 
					
						
							| 
									
										
										
										
											2009-11-05 11:26:04 +08:00
										 |  |  | 		      Matrix T, | 
					
						
							| 
									
										
										
										
											2009-11-11 15:14:13 +08:00
										 |  |  | 		      Vector sigmas); | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   Vector solve(const VectorConfig& x); | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  |   void add(string key, Matrix S); | 
					
						
							| 
									
										
										
										
											2009-11-13 00:41:18 +08:00
										 |  |  |   bool equals(const GaussianConditional &cg, double tol) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-01 03:53:20 +08:00
										 |  |  | class GaussianBayesNet { | 
					
						
							|  |  |  |   GaussianBayesNet(); | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							|  |  |  |   bool equals(const GaussianBayesNet& cbn, double tol) const; | 
					
						
							| 
									
										
										
										
											2009-11-13 00:41:18 +08:00
										 |  |  |   void push_back(GaussianConditional* conditional); | 
					
						
							|  |  |  |   void push_front(GaussianConditional* conditional); | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  | class GaussianFactorGraph { | 
					
						
							|  |  |  |   GaussianFactorGraph(); | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   size_t size() const; | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  |   void push_back(GaussianFactor* ptr_f); | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   double error(const VectorConfig& c) const; | 
					
						
							|  |  |  |   double probPrime(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  |   bool equals(const GaussianFactorGraph& lfgraph, double tol) const; | 
					
						
							| 
									
										
										
										
											2009-12-02 00:01:29 +08:00
										 |  |  |   void combine(const GaussianFactorGraph& lfg); | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-13 00:41:18 +08:00
										 |  |  |   GaussianConditional* eliminateOne(string key); | 
					
						
							| 
									
										
										
										
											2009-11-11 15:14:13 +08:00
										 |  |  |   GaussianBayesNet* eliminate_(const Ordering& ordering); | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   VectorConfig* optimize_(const Ordering& ordering); | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  |   pair<Matrix,Vector> matrix(const Ordering& ordering) const; | 
					
						
							| 
									
										
										
										
											2009-11-06 13:43:03 +08:00
										 |  |  |   Matrix sparse(const Ordering& ordering) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Point2 { | 
					
						
							|  |  |  |   Point2(); | 
					
						
							|  |  |  |   Point2(double x, double y); | 
					
						
							|  |  |  |   double x(); | 
					
						
							|  |  |  |   double y(); | 
					
						
							|  |  |  |   size_t dim() const; | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Point3 { | 
					
						
							|  |  |  |   Point3(); | 
					
						
							|  |  |  |   Point3(double x, double y, double z); | 
					
						
							|  |  |  |   Point3(Vector v); | 
					
						
							|  |  |  |   size_t dim() const; | 
					
						
							|  |  |  |   Point3 exmap(Vector d) const; | 
					
						
							|  |  |  |   Vector vector() const; | 
					
						
							|  |  |  |   double x(); | 
					
						
							|  |  |  |   double y(); | 
					
						
							|  |  |  |   double z(); | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | };  | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Point2Prior { | 
					
						
							|  |  |  |   Point2Prior(Vector mu, double sigma, string key); | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   Vector error_vector(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  |   GaussianFactor* linearize(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-10-21 04:41:45 +08:00
										 |  |  |   double sigma(); | 
					
						
							|  |  |  |   Vector measurement(); | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   double error(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Simulated2DOdometry { | 
					
						
							|  |  |  |   Simulated2DOdometry(Vector odo, double sigma, string key, string key2); | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   Vector error_vector(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  |   GaussianFactor* linearize(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-10-21 04:41:45 +08:00
										 |  |  |   double sigma(); | 
					
						
							|  |  |  |   Vector measurement(); | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   double error(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Simulated2DMeasurement { | 
					
						
							|  |  |  |   Simulated2DMeasurement(Vector odo, double sigma, string key, string key2); | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   Vector error_vector(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-11-13 00:16:32 +08:00
										 |  |  |   GaussianFactor* linearize(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-10-21 04:41:45 +08:00
										 |  |  |   double sigma(); | 
					
						
							|  |  |  |   Vector measurement(); | 
					
						
							| 
									
										
										
										
											2009-10-15 04:39:59 +08:00
										 |  |  |   double error(const VectorConfig& c) const; | 
					
						
							| 
									
										
										
										
											2009-11-12 06:45:08 +08:00
										 |  |  |   void print(string s) const; | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 03:55:25 +08:00
										 |  |  | class Pose2{ | 
					
						
							|  |  |  | 	Pose2(); | 
					
						
							|  |  |  | 	Pose2(const Pose2& pose); | 
					
						
							|  |  |  | 	Pose2(double x, double y, double theta); | 
					
						
							|  |  |  | 	void print(string s); | 
					
						
							|  |  |  | 	bool equals(const Pose2& pose, double tol); | 
					
						
							|  |  |  | 	double x(); | 
					
						
							|  |  |  | 	double y(); | 
					
						
							|  |  |  | 	double theta(); | 
					
						
							|  |  |  | 	size_t dim() const; | 
					
						
							| 
									
										
										
										
											2009-12-10 07:43:01 +08:00
										 |  |  | 	Pose2 exmap(Vector v) const; | 
					
						
							| 
									
										
										
										
											2009-12-10 03:55:25 +08:00
										 |  |  | 	Vector vector() const; | 
					
						
							|  |  |  | 	Pose2 rotate(double theta) const; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 01:29:43 +08:00
										 |  |  | class Pose2Config{ | 
					
						
							| 
									
										
										
										
											2009-12-10 12:12:41 +08:00
										 |  |  | 	Pose2Config(); | 
					
						
							| 
									
										
										
										
											2009-12-10 01:29:43 +08:00
										 |  |  | 	Pose2 get(string key) const; | 
					
						
							| 
									
										
										
										
											2009-12-11 07:45:38 +08:00
										 |  |  | 	void insert(string name, const Pose2& val); | 
					
						
							| 
									
										
										
										
											2009-12-10 01:29:43 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 07:43:01 +08:00
										 |  |  | class Pose2Factor { | 
					
						
							|  |  |  | 	Pose2Factor(string key1, string key2, | 
					
						
							|  |  |  | 			const Pose2& measured, Matrix measurement_covariance); | 
					
						
							| 
									
										
										
										
											2009-12-10 01:29:43 +08:00
										 |  |  | 	void print(string name) const; | 
					
						
							| 
									
										
										
										
											2009-12-10 07:43:01 +08:00
										 |  |  | 	bool equals(const Pose2Factor& expected, double tol) const; | 
					
						
							| 
									
										
										
										
											2009-12-10 01:29:43 +08:00
										 |  |  | 	double error(const Pose2Config& c) const; | 
					
						
							|  |  |  | 	size_t size() const; | 
					
						
							|  |  |  | 	GaussianFactor* linearize(const Pose2Config& config) const; | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2009-12-11 07:45:38 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | class Pose2Graph{ | 
					
						
							|  |  |  | 	Pose2Graph(); | 
					
						
							|  |  |  | 	void print(string s) const; | 
					
						
							|  |  |  | 	bool equals(const Pose2Graph& p, double tol) const; | 
					
						
							| 
									
										
										
										
											2009-12-12 05:34:08 +08:00
										 |  |  | 	GaussianFactorGraph* linearize_(const Pose2Config& config) const; | 
					
						
							| 
									
										
										
										
											2009-12-11 07:45:38 +08:00
										 |  |  | 	void push_back(Pose2Factor* factor); | 
					
						
							| 
									
										
										
										
											2009-12-12 06:53:48 +08:00
										 |  |  | 	Ordering* getOrdering_() const; | 
					
						
							| 
									
										
										
										
											2009-12-11 07:45:38 +08:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2009-12-12 05:34:08 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 |