| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							| 
									
										
										
										
											2010-07-13 06:18:38 +08:00
										 |  |  | # GTSAM core functionality: base classes for inference, as well as symbolic and discrete
 | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 01:23:19 +08:00
										 |  |  | # use nostdinc to turn off -I. and -I.., we do not need them because 
 | 
					
						
							|  |  |  | # header files are qualified so they can be included in external projects.
 | 
					
						
							|  |  |  | AUTOMAKE_OPTIONS = nostdinc | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | headers = | 
					
						
							|  |  |  | sources =  | 
					
						
							|  |  |  | check_PROGRAMS =  | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							|  |  |  | # base
 | 
					
						
							|  |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | # GTSAM core
 | 
					
						
							| 
									
										
										
										
											2010-07-13 00:36:58 +08:00
										 |  |  | headers += Key.h SymbolMap.h Factor.h Conditional.h IndexTable.h  | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | sources += Ordering.cpp  | 
					
						
							| 
									
										
										
										
											2010-07-17 01:10:16 +08:00
										 |  |  | check_PROGRAMS += tests/testOrdering tests/testKey | 
					
						
							| 
									
										
										
										
											2009-11-12 12:54:31 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-11 09:38:45 +08:00
										 |  |  | # Symbolic Inference
 | 
					
						
							|  |  |  | headers += SymbolicConditional.h | 
					
						
							|  |  |  | sources += SymbolicFactor.cpp SymbolicFactorGraph.cpp SymbolicBayesNet.cpp | 
					
						
							| 
									
										
										
										
											2010-07-17 01:10:16 +08:00
										 |  |  | check_PROGRAMS += tests/testSymbolicFactor tests/testSymbolicFactorGraph tests/testSymbolicBayesNet   | 
					
						
							| 
									
										
										
										
											2009-12-11 09:38:45 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 12:54:31 +08:00
										 |  |  | # Inference
 | 
					
						
							|  |  |  | headers += inference.h inference-inl.h | 
					
						
							| 
									
										
											  
											
												Large gtsam refactoring
To support faster development *and* better performance Richard and I pushed through a large refactoring of NonlinearFactors.
The following are the biggest changes:
1) NonLinearFactor1 and NonLinearFactor2 are now templated on Config, Key type, and X type, where X is the argument to the measurement function.
2) The measurement itself is no longer kept in the nonlinear factor. Instead, a derived class (see testVSLAMFactor, testNonlinearEquality, testPose3Factor etc...) has to implement a function to compute the errors, "evaluateErrors". Instead of (h(x)-z), it needs to return (z-h(x)), so Ax-b is an approximation of the error. IMPORTANT: evaluateErrors needs - if asked - *combine* the calculation of the function value h(x) and the derivatives dh(x)/dx. This was a major performance issue. To do this, boost::optional<Matrix&> arguments are provided, and tin EvaluateErrors you just  says something like
	if (H) *H = Matrix_(3,6,....);
3) We are no longer using int or strings for nonlinear factors. Instead, the preferred key type is now Symbol, defined in Key.h. This is both fast and cool: you can construct it from an int, and cast it to a strong. It also does type checking: a Symbol<Pose3,'x'> will not match a Symbol<Pose2,'x'>
4) minor: take a look at LieConfig.h: it help you avoid writing a lot of code bu automatically creating configs for a certain type. See e.g. Pose3Config.h. A "double" LieConfig is on the way - Thanks Richard and Manohar !
											
										 
											2010-01-14 06:25:03 +08:00
										 |  |  | headers += graph.h graph-inl.h | 
					
						
							| 
									
										
										
										
											2009-11-12 12:54:31 +08:00
										 |  |  | headers += FactorGraph.h FactorGraph-inl.h | 
					
						
							| 
									
										
										
										
											2010-07-14 06:03:18 +08:00
										 |  |  | headers += ClusterTree.h ClusterTree-inl.h | 
					
						
							| 
									
										
										
										
											2010-07-08 05:41:50 +08:00
										 |  |  | headers += JunctionTree.h JunctionTree-inl.h | 
					
						
							| 
									
										
										
										
											2010-07-14 23:22:37 +08:00
										 |  |  | headers += EliminationTree.h EliminationTree-inl.h | 
					
						
							| 
									
										
										
										
											2009-12-10 03:39:25 +08:00
										 |  |  | headers += BayesNet.h BayesNet-inl.h | 
					
						
							| 
									
										
										
										
											2009-12-28 07:15:36 +08:00
										 |  |  | headers += BayesTree.h BayesTree-inl.h | 
					
						
							| 
									
										
										
										
											2010-07-13 00:36:58 +08:00
										 |  |  | headers += ISAM.h ISAM-inl.h | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | headers += ISAM2.h ISAM2-inl.h | 
					
						
							| 
									
										
										
										
											2010-07-17 01:10:16 +08:00
										 |  |  | check_PROGRAMS += tests/testFactorGraph tests/testClusterTree tests/testEliminationTree tests/testJunctionTree tests/testBayesTree tests/testISAM | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							|  |  |  | # discrete
 | 
					
						
							|  |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							| 
									
										
										
										
											2009-11-12 12:54:31 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-07 05:46:46 +08:00
										 |  |  | # Binary Inference
 | 
					
						
							|  |  |  | headers += BinaryConditional.h | 
					
						
							| 
									
										
										
										
											2010-07-17 01:10:16 +08:00
										 |  |  | check_PROGRAMS += tests/testBinaryBayesNet | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Timing tests
 | 
					
						
							| 
									
										
										
										
											2010-07-17 01:10:16 +08:00
										 |  |  | noinst_PROGRAMS = tests/timeSymbolMaps | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							|  |  |  | # Create a libtool library that is not installed
 | 
					
						
							|  |  |  | # It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am 
 | 
					
						
							|  |  |  | # The headers are installed in $(includedir)/gtsam: 
 | 
					
						
							|  |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							| 
									
										
										
										
											2009-09-09 12:43:04 +08:00
										 |  |  | headers += $(sources:.cpp=.h) | 
					
						
							| 
									
										
										
										
											2010-08-20 01:23:19 +08:00
										 |  |  | inferencedir = $(pkgincludedir)/inference | 
					
						
							|  |  |  | inference_HEADERS = $(headers) | 
					
						
							| 
									
										
										
										
											2010-07-13 00:36:58 +08:00
										 |  |  | noinst_LTLIBRARIES = libinference.la | 
					
						
							|  |  |  | libinference_la_SOURCES = $(sources) | 
					
						
							| 
									
										
										
										
											2010-09-12 00:54:50 +08:00
										 |  |  | AM_CPPFLAGS = -I$(boost) -I$(top_srcdir)/.. | 
					
						
							| 
									
										
										
										
											2010-07-13 00:36:58 +08:00
										 |  |  | AM_CXXFLAGS = | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							|  |  |  | # rules to build local programs
 | 
					
						
							|  |  |  | #----------------------------------------------------------------------------------------------------
 | 
					
						
							|  |  |  | TESTS = $(check_PROGRAMS) | 
					
						
							|  |  |  | AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization)  | 
					
						
							| 
									
										
										
										
											2010-07-13 00:36:58 +08:00
										 |  |  | LDADD = libinference.la ../base/libbase.la  | 
					
						
							| 
									
										
										
										
											2010-07-17 02:16:18 +08:00
										 |  |  | LDADD += ../CppUnitLite/libCppUnitLite.a ../colamd/libcolamd.la  | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | AM_DEFAULT_SOURCE_EXT = .cpp | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | # rule to run an executable
 | 
					
						
							|  |  |  | %.run: % $(LDADD) | 
					
						
							|  |  |  | 	./$^ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-03 07:38:01 +08:00
										 |  |  | # rule to run executable with valgrind
 | 
					
						
							|  |  |  | %.valgrind: % $(LDADD) | 
					
						
							|  |  |  | 	valgrind ./$^ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-08 06:26:46 +08:00
										 |  |  | if USE_LAPACK | 
					
						
							| 
									
										
										
										
											2010-07-01 01:23:58 +08:00
										 |  |  | AM_CXXFLAGS += -DGT_USE_LAPACK | 
					
						
							| 
									
										
										
										
											2010-07-12 15:16:31 +08:00
										 |  |  | LDADD += ../spqr_mini/libspqr_mini.la | 
					
						
							| 
									
										
										
										
											2010-07-01 01:23:58 +08:00
										 |  |  | endif | 
					
						
							|  |  |  | 
 |