| 
									
										
										
										
											2010-10-14 12:54:38 +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 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * -------------------------------------------------------------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-28 07:15:36 +08:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @file    ISAM.h | 
					
						
							|  |  |  |  * @brief   Incremental update functionality (iSAM) for BayesTree. | 
					
						
							|  |  |  |  * @author  Michael Kaess | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // \callgraph
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <map>
 | 
					
						
							|  |  |  | #include <list>
 | 
					
						
							|  |  |  | #include <vector>
 | 
					
						
							| 
									
										
										
										
											2010-10-09 06:04:47 +08:00
										 |  |  | #include <deque>
 | 
					
						
							| 
									
										
										
										
											2010-08-27 23:31:20 +08:00
										 |  |  | //#include <boost/serialization/map.hpp>
 | 
					
						
							|  |  |  | //#include <boost/serialization/list.hpp>
 | 
					
						
							| 
									
										
										
										
											2010-10-09 06:04:47 +08:00
										 |  |  | #include <boost/pool/pool_alloc.hpp>
 | 
					
						
							| 
									
										
										
										
											2009-12-28 07:15:36 +08:00
										 |  |  | #include <stdexcept>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 01:23:19 +08:00
										 |  |  | #include <gtsam/base/Testable.h>
 | 
					
						
							|  |  |  | #include <gtsam/inference/FactorGraph.h>
 | 
					
						
							|  |  |  | #include <gtsam/inference/BayesNet.h>
 | 
					
						
							|  |  |  | #include <gtsam/inference/BayesTree.h>
 | 
					
						
							| 
									
										
										
										
											2009-12-28 07:15:36 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace gtsam { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	template<class Conditional> | 
					
						
							|  |  |  | 	class ISAM: public BayesTree<Conditional> { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	public: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		/** Create an empty Bayes Tree */ | 
					
						
							|  |  |  | 		ISAM(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		/** Create a Bayes Tree from a Bayes Net */ | 
					
						
							|  |  |  | 		ISAM(const BayesNet<Conditional>& bayesNet); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		typedef typename BayesTree<Conditional>::sharedClique sharedClique; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		typedef typename BayesTree<Conditional>::Cliques Cliques; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		/**
 | 
					
						
							|  |  |  | 		 * iSAM. (update_internal provides access to list of orphans for drawing purposes) | 
					
						
							|  |  |  | 		 */ | 
					
						
							| 
									
										
										
										
											2010-10-09 06:04:47 +08:00
										 |  |  | 		template<class FactorGraph> | 
					
						
							|  |  |  | 		void update_internal(const FactorGraph& newFactors, Cliques& orphans); | 
					
						
							|  |  |  | 		template<class FactorGraph> | 
					
						
							|  |  |  | 		void update(const FactorGraph& newFactors); | 
					
						
							| 
									
										
										
										
											2009-12-28 07:15:36 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	}; // ISAM
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } /// namespace gtsam
 |