diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 000000000..448d0dcc5 --- /dev/null +++ b/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,4 @@ +#Wed Aug 18 18:00:45 EDT 2010 +eclipse.preferences.version=1 +environment/project/cdt.managedbuild.toolchain.gnu.macosx.base.1359703544/append=true +environment/project/cdt.managedbuild.toolchain.gnu.macosx.base.1359703544/appendContributed=true diff --git a/CppUnitLite/Makefile.am b/CppUnitLite/Makefile.am index 132aead77..7767347c3 100644 --- a/CppUnitLite/Makefile.am +++ b/CppUnitLite/Makefile.am @@ -7,6 +7,7 @@ headers = TestHarness.h sources = Failure.cpp SimpleString.cpp Test.cpp TestRegistry.cpp TestResult.cpp headers += $(sources:.cpp=.h) -noinst_HEADERS = $(headers) +CppUnitLitedir = $(pkgincludedir)/CppUnitLite +CppUnitLite_HEADERS = $(headers) noinst_LIBRARIES = libCppUnitLite.a libCppUnitLite_a_SOURCES = $(sources) diff --git a/Makefile.am b/Makefile.am index 918f20854..03b02cf63 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,9 @@ ACLOCAL_AMFLAGS = -I m4 # make automake install some standard but missing files -AUTOMAKE_OPTIONS = foreign +# also 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 = foreign nostdinc # All the sub-directories that need to be built SUBDIRS = CppUnitLite colamd spqr_mini base geometry inference linear nonlinear slam . tests wrap @@ -31,7 +33,12 @@ libgtsam_la_SOURCES = libgtsam_la_LIBADD = $(SUBLIBS) libgtsam_la_LDFLAGS = -version-info 0:0:0 -# Add these files to make dure they're in the distribution +# Store the absolute path to the directory above gtsam for the include path, +# saves us from having an extra 'gtsam' subdirectory. +BORG_SRCROOT := $(shell cd $(top_srcdir)/.. && pwd) +AM_MAKEFLAGS = "BORG_SRCROOT=$(BORG_SRCROOT)" + +# Add these files to make sure they're in the distribution noinst_HEADERS = gtsam.h EXTRA_DIST = autogen.sh configure.ac THANKS diff --git a/base/DSF.h b/base/DSF.h index 4c383ef0c..15d1adf5c 100644 --- a/base/DSF.h +++ b/base/DSF.h @@ -16,7 +16,7 @@ #include #include #include -#include "BTree.h" +#include namespace gtsam { diff --git a/base/DSFVector.cpp b/base/DSFVector.cpp index 2e1ccc305..a04ccde5a 100644 --- a/base/DSFVector.cpp +++ b/base/DSFVector.cpp @@ -7,7 +7,7 @@ * As a result, the size of the forest is prefixed. */ -#include "DSFVector.h" +#include using namespace std; diff --git a/base/FixedVector.h b/base/FixedVector.h index 164b1acd9..a661ebe43 100644 --- a/base/FixedVector.h +++ b/base/FixedVector.h @@ -6,9 +6,9 @@ #pragma once -#include +#include #include -#include +#include namespace gtsam { diff --git a/base/Lie-inl.h b/base/Lie-inl.h index 616ac0702..19aa09d15 100644 --- a/base/Lie-inl.h +++ b/base/Lie-inl.h @@ -7,7 +7,7 @@ #pragma once -#include "Lie.h" +#include #define INSTANTIATE_LIE(T) \ template T between(const T&, const T&); \ diff --git a/base/Lie.h b/base/Lie.h index 61d369bf7..f36c29840 100644 --- a/base/Lie.h +++ b/base/Lie.h @@ -8,7 +8,7 @@ #pragma once #include -#include "Matrix.h" +#include namespace gtsam { diff --git a/base/Makefile.am b/base/Makefile.am index ef0b1930b..0c2551f78 100644 --- a/base/Makefile.am +++ b/base/Makefile.am @@ -3,6 +3,10 @@ # provides some base Math and data structures, as well as test-related utilities #---------------------------------------------------------------------------------------------------- +# 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 + headers = sources = check_PROGRAMS = @@ -38,11 +42,12 @@ noinst_PROGRAMS = tests/timeMatrix # The headers are installed in $(includedir)/gtsam: #---------------------------------------------------------------------------------------------------- headers += $(sources:.cpp=.h) -pkginclude_HEADERS = $(headers) +basedir = $(pkgincludedir)/base +base_HEADERS = $(headers) noinst_LTLIBRARIES = libbase.la libbase_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) +AM_CPPFLAGS = -I$(boost) -I$(BORG_SRCROOT) if USE_BLAS AM_CPPFLAGS += -DGT_USE_CBLAS diff --git a/base/Matrix.cpp b/base/Matrix.cpp index 06502a6ae..2fc84b92f 100644 --- a/base/Matrix.cpp +++ b/base/Matrix.cpp @@ -38,9 +38,9 @@ extern "C" { #include #endif -#include "Matrix.h" -#include "Vector.h" -#include "svdcmp.h" +#include +#include +#include using namespace std; namespace ublas = boost::numeric::ublas; diff --git a/base/Matrix.h b/base/Matrix.h index a2a517ed2..654530069 100644 --- a/base/Matrix.h +++ b/base/Matrix.h @@ -14,7 +14,7 @@ #include #include #include -#include "Vector.h" +#include /** * Vector is a *global* typedef diff --git a/base/SPQRUtil.cpp b/base/SPQRUtil.cpp index 2f68c360f..52180afc6 100644 --- a/base/SPQRUtil.cpp +++ b/base/SPQRUtil.cpp @@ -7,7 +7,7 @@ */ #include -#include "SPQRUtil.h" +#include using namespace std; diff --git a/base/SPQRUtil.h b/base/SPQRUtil.h index ff2806605..404d0bf79 100644 --- a/base/SPQRUtil.h +++ b/base/SPQRUtil.h @@ -8,10 +8,10 @@ #pragma once -#include "Matrix.h" +#include #ifdef GT_USE_LAPACK -#include +#include namespace gtsam { diff --git a/base/TestableAssertions.h b/base/TestableAssertions.h index 59ab43da3..f3eef10cd 100644 --- a/base/TestableAssertions.h +++ b/base/TestableAssertions.h @@ -8,7 +8,7 @@ #include #include -#include "Testable.h" +#include namespace gtsam { diff --git a/base/Vector.cpp b/base/Vector.cpp index c1a593f10..d2a14cd53 100644 --- a/base/Vector.cpp +++ b/base/Vector.cpp @@ -25,7 +25,7 @@ #include #include -#include "Vector.h" +#include using namespace std; namespace ublas = boost::numeric::ublas; diff --git a/base/numericalDerivative.h b/base/numericalDerivative.h index 148db15df..4529e6023 100644 --- a/base/numericalDerivative.h +++ b/base/numericalDerivative.h @@ -11,8 +11,8 @@ #include #include -#include "Lie.h" -#include "Matrix.h" +#include +#include //#define LINEARIZE_AT_IDENTITY diff --git a/base/svdcmp.cpp b/base/svdcmp.cpp index aec1e2eb6..136d229a6 100644 --- a/base/svdcmp.cpp +++ b/base/svdcmp.cpp @@ -8,7 +8,7 @@ #include /* for 'fabs' */ #include #include -#include "Matrix.h" +#include using namespace std; diff --git a/base/tests/testBTree.cpp b/base/tests/testBTree.cpp index b3b7cdf16..29dd93857 100644 --- a/base/tests/testBTree.cpp +++ b/base/tests/testBTree.cpp @@ -11,8 +11,8 @@ #include // for += using namespace boost::assign; -#include -#include "BTree.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/base/tests/testDSF.cpp b/base/tests/testDSF.cpp index ab541460c..16ad36bc4 100644 --- a/base/tests/testDSF.cpp +++ b/base/tests/testDSF.cpp @@ -10,9 +10,9 @@ #include #include using namespace boost::assign; -#include +#include -#include "DSF.h" +#include using namespace std; using namespace gtsam; diff --git a/base/tests/testDSFVector.cpp b/base/tests/testDSFVector.cpp index 4cb3c3270..9b8c675e7 100644 --- a/base/tests/testDSFVector.cpp +++ b/base/tests/testDSFVector.cpp @@ -10,9 +10,9 @@ #include #include using namespace boost::assign; -#include +#include -#include "DSFVector.h" +#include using namespace std; using namespace gtsam; diff --git a/base/tests/testFixedVector.cpp b/base/tests/testFixedVector.cpp index 567859a0c..84a72cc4d 100644 --- a/base/tests/testFixedVector.cpp +++ b/base/tests/testFixedVector.cpp @@ -3,9 +3,9 @@ * @author Alex Cunningham */ -#include +#include -#include +#include using namespace gtsam; diff --git a/base/tests/testMatrix.cpp b/base/tests/testMatrix.cpp index 6db630d76..42897bcae 100644 --- a/base/tests/testMatrix.cpp +++ b/base/tests/testMatrix.cpp @@ -6,12 +6,12 @@ **/ #include -#include +#include #include #include #include #include -#include "Matrix.h" +#include using namespace std; using namespace gtsam; diff --git a/base/tests/testSPQRUtil.cpp b/base/tests/testSPQRUtil.cpp index 84379e922..459b44dcd 100644 --- a/base/tests/testSPQRUtil.cpp +++ b/base/tests/testSPQRUtil.cpp @@ -5,8 +5,8 @@ **/ #include -#include -#include "SPQRUtil.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/base/tests/testVector.cpp b/base/tests/testVector.cpp index 7cfd8f319..07ae0aee7 100644 --- a/base/tests/testVector.cpp +++ b/base/tests/testVector.cpp @@ -5,9 +5,9 @@ **/ #include -#include +#include #include -#include "Vector.h" +#include using namespace std; using namespace gtsam; diff --git a/base/tests/timeMatrix.cpp b/base/tests/timeMatrix.cpp index bde581b7e..aee020a31 100644 --- a/base/tests/timeMatrix.cpp +++ b/base/tests/timeMatrix.cpp @@ -7,7 +7,7 @@ #include #include #include -#include "Matrix.h" +#include using namespace std; using namespace gtsam; diff --git a/colamd/Makefile.am b/colamd/Makefile.am index 821cf2b49..97596f6a5 100644 --- a/colamd/Makefile.am +++ b/colamd/Makefile.am @@ -9,7 +9,8 @@ noinst_LTLIBRARIES = libcolamd.la # We normally would not install these headers # but they are included in the templated class FactorGraph-inl.h so we need them -pkginclude_HEADERS = colamd.h ccolamd.h UFconfig.h +colamddir = $(pkgincludedir)/colamd +colamd_HEADERS = colamd.h ccolamd.h UFconfig.h # These are the sources for the library: libcolamd_la_SOURCES = colamd.c colamd_global.c ccolamd.c ccolamd_global.c diff --git a/geometry/Cal3_S2.cpp b/geometry/Cal3_S2.cpp index 7ee9457e5..3a321c607 100644 --- a/geometry/Cal3_S2.cpp +++ b/geometry/Cal3_S2.cpp @@ -7,7 +7,7 @@ #include #include -#include "Cal3_S2.h" +#include namespace gtsam { using namespace std; diff --git a/geometry/Cal3_S2.h b/geometry/Cal3_S2.h index 9db7f46d5..3760f9134 100644 --- a/geometry/Cal3_S2.h +++ b/geometry/Cal3_S2.h @@ -6,8 +6,8 @@ #pragma once -#include "Matrix.h" -#include "Point2.h" +#include +#include #include namespace gtsam { diff --git a/geometry/CalibratedCamera.cpp b/geometry/CalibratedCamera.cpp index e97989693..d9f2f384e 100644 --- a/geometry/CalibratedCamera.cpp +++ b/geometry/CalibratedCamera.cpp @@ -5,8 +5,8 @@ * Author: dellaert */ -#include "Point2.h" -#include "CalibratedCamera.h" +#include +#include namespace gtsam { diff --git a/geometry/CalibratedCamera.h b/geometry/CalibratedCamera.h index 912ec6bc3..4412b23df 100644 --- a/geometry/CalibratedCamera.h +++ b/geometry/CalibratedCamera.h @@ -8,8 +8,8 @@ #ifndef CalibratedCAMERA_H_ #define CalibratedCAMERA_H_ -#include "Pose2.h" -#include "Pose3.h" +#include +#include namespace gtsam { diff --git a/geometry/Makefile.am b/geometry/Makefile.am index 01547fda9..25122548d 100644 --- a/geometry/Makefile.am +++ b/geometry/Makefile.am @@ -2,6 +2,10 @@ # GTSAM geometry #---------------------------------------------------------------------------------------------------- +# 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 + headers = sources = check_PROGRAMS = @@ -33,10 +37,11 @@ noinst_PROGRAMS = timeRot3 timeCalibratedCamera # The headers are installed in $(includedir)/gtsam: #---------------------------------------------------------------------------------------------------- headers += $(sources:.cpp=.h) -pkginclude_HEADERS = $(headers) +geometrydir = $(pkgincludedir)/geometry +geometry_HEADERS = $(headers) noinst_LTLIBRARIES = libgeometry.la libgeometry_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/base +AM_CPPFLAGS = -I$(boost) -I$(BORG_SRCROOT) #---------------------------------------------------------------------------------------------------- # rules to build local programs diff --git a/geometry/Point2.cpp b/geometry/Point2.cpp index eb0dba421..87caea645 100644 --- a/geometry/Point2.cpp +++ b/geometry/Point2.cpp @@ -4,8 +4,8 @@ * @author Frank Dellaert */ -#include "Point2.h" -#include "Lie-inl.h" +#include +#include using namespace std; diff --git a/geometry/Point2.h b/geometry/Point2.h index c03df7c44..2b472a379 100644 --- a/geometry/Point2.h +++ b/geometry/Point2.h @@ -7,10 +7,10 @@ #pragma once #include -#include "Vector.h" -#include "Matrix.h" -#include "Testable.h" -#include "Lie.h" +#include +#include +#include +#include namespace gtsam { diff --git a/geometry/Point3.cpp b/geometry/Point3.cpp index d7e5c82ed..6a2efa1c8 100644 --- a/geometry/Point3.cpp +++ b/geometry/Point3.cpp @@ -3,8 +3,8 @@ * @brief 3D Point */ -#include "Point3.h" -#include "Lie-inl.h" +#include +#include namespace gtsam { diff --git a/geometry/Point3.h b/geometry/Point3.h index b4baaddbe..763042a80 100644 --- a/geometry/Point3.h +++ b/geometry/Point3.h @@ -12,9 +12,9 @@ #include -#include "Matrix.h" -#include "Testable.h" -#include "Lie.h" +#include +#include +#include namespace gtsam { diff --git a/geometry/Pose2.cpp b/geometry/Pose2.cpp index 7668256b3..de2039364 100644 --- a/geometry/Pose2.cpp +++ b/geometry/Pose2.cpp @@ -3,8 +3,8 @@ * @brief 2D Pose */ -#include "Pose2.h" -#include "Lie-inl.h" +#include +#include using namespace std; diff --git a/geometry/Pose2.h b/geometry/Pose2.h index 4776f7a88..4cf982837 100644 --- a/geometry/Pose2.h +++ b/geometry/Pose2.h @@ -10,11 +10,11 @@ #pragma once #include -#include "Matrix.h" -#include "Testable.h" -#include "Lie.h" -#include "Point2.h" -#include "Rot2.h" +#include +#include +#include +#include +#include namespace gtsam { diff --git a/geometry/Pose3.cpp b/geometry/Pose3.cpp index de153a76c..9a81e1644 100644 --- a/geometry/Pose3.cpp +++ b/geometry/Pose3.cpp @@ -4,8 +4,8 @@ */ #include -#include "Pose3.h" -#include "Lie-inl.h" +#include +#include using namespace std; using namespace boost::numeric::ublas; diff --git a/geometry/Pose3.h b/geometry/Pose3.h index 3b809f54b..29bc91d15 100644 --- a/geometry/Pose3.h +++ b/geometry/Pose3.h @@ -9,10 +9,10 @@ #include -#include "Point3.h" -#include "Rot3.h" -#include "Testable.h" -#include "Lie.h" +#include +#include +#include +#include namespace gtsam { diff --git a/geometry/Rot2.cpp b/geometry/Rot2.cpp index 03249e17d..1f0170c92 100644 --- a/geometry/Rot2.cpp +++ b/geometry/Rot2.cpp @@ -5,8 +5,8 @@ * Author: Frank Dellaert */ -#include "Rot2.h" -#include "Lie-inl.h" +#include +#include using namespace std; diff --git a/geometry/Rot2.h b/geometry/Rot2.h index 1d77ce49c..251ea2b66 100644 --- a/geometry/Rot2.h +++ b/geometry/Rot2.h @@ -9,10 +9,10 @@ #define ROT2_H_ #include -#include "Testable.h" -#include "Point2.h" -#include "Matrix.h" -#include "Lie.h" +#include +#include +#include +#include namespace gtsam { diff --git a/geometry/Rot3.cpp b/geometry/Rot3.cpp index c1f53ff7a..ee6d07571 100644 --- a/geometry/Rot3.cpp +++ b/geometry/Rot3.cpp @@ -6,8 +6,8 @@ * @author Frank Dellaert */ -#include "Rot3.h" -#include "Lie-inl.h" +#include +#include using namespace std; diff --git a/geometry/Rot3.h b/geometry/Rot3.h index a53e955fa..700d221c2 100644 --- a/geometry/Rot3.h +++ b/geometry/Rot3.h @@ -11,9 +11,9 @@ #pragma once #include -#include "Point3.h" -#include "Testable.h" -#include "Lie.h" +#include +#include +#include namespace gtsam { diff --git a/geometry/SimpleCamera.cpp b/geometry/SimpleCamera.cpp index c377d74b2..87f6ba032 100644 --- a/geometry/SimpleCamera.cpp +++ b/geometry/SimpleCamera.cpp @@ -5,8 +5,8 @@ * Author: dellaert */ -#include "SimpleCamera.h" -#include "CalibratedCamera.h" +#include +#include using namespace std; diff --git a/geometry/SimpleCamera.h b/geometry/SimpleCamera.h index 352b5cf1a..59dace4f5 100644 --- a/geometry/SimpleCamera.h +++ b/geometry/SimpleCamera.h @@ -8,8 +8,8 @@ #ifndef SIMPLECAMERA_H_ #define SIMPLECAMERA_H_ -#include "CalibratedCamera.h" -#include "Cal3_S2.h" +#include +#include namespace gtsam { diff --git a/geometry/StereoCamera.cpp b/geometry/StereoCamera.cpp index 98999f2fb..38da76e0e 100644 --- a/geometry/StereoCamera.cpp +++ b/geometry/StereoCamera.cpp @@ -4,7 +4,7 @@ * @author Chris Beall */ -#include "StereoCamera.h" +#include using namespace std; using namespace gtsam; diff --git a/geometry/StereoCamera.h b/geometry/StereoCamera.h index 3dc69c212..b7f5c5874 100644 --- a/geometry/StereoCamera.h +++ b/geometry/StereoCamera.h @@ -7,10 +7,10 @@ #pragma once #include "boost/tuple/tuple.hpp" -#include -#include -#include -#include "StereoPoint2.h" +#include +#include +#include +#include namespace gtsam { diff --git a/geometry/StereoPoint2.cpp b/geometry/StereoPoint2.cpp index ee7141a5e..50f006927 100644 --- a/geometry/StereoPoint2.cpp +++ b/geometry/StereoPoint2.cpp @@ -5,5 +5,5 @@ * Author: dellaert */ -#include "StereoPoint2.h" +#include diff --git a/geometry/StereoPoint2.h b/geometry/StereoPoint2.h index 74e9c6e26..621ccad9d 100644 --- a/geometry/StereoPoint2.h +++ b/geometry/StereoPoint2.h @@ -9,10 +9,10 @@ #define STEREOPOINT2_H_ #include -#include -#include -#include -#include +#include +#include +#include +#include namespace gtsam { diff --git a/geometry/Tensor1.h b/geometry/Tensor1.h index 8fb714dc6..bcd4a680a 100644 --- a/geometry/Tensor1.h +++ b/geometry/Tensor1.h @@ -6,7 +6,7 @@ */ #pragma once -#include "tensors.h" +#include namespace tensors { diff --git a/geometry/Tensor1Expression.h b/geometry/Tensor1Expression.h index 71a45159c..ef651e0df 100644 --- a/geometry/Tensor1Expression.h +++ b/geometry/Tensor1Expression.h @@ -10,7 +10,7 @@ #include #include #include -#include "tensors.h" +#include namespace tensors { diff --git a/geometry/Tensor2.h b/geometry/Tensor2.h index 36bc5ce75..8dd7d5b08 100644 --- a/geometry/Tensor2.h +++ b/geometry/Tensor2.h @@ -6,7 +6,7 @@ */ #pragma once -#include "tensors.h" +#include namespace tensors { diff --git a/geometry/Tensor2Expression.h b/geometry/Tensor2Expression.h index f61a2ee3b..e0c9d661e 100644 --- a/geometry/Tensor2Expression.h +++ b/geometry/Tensor2Expression.h @@ -9,7 +9,7 @@ #include #include -#include "tensors.h" +#include namespace tensors { diff --git a/geometry/Tensor3.h b/geometry/Tensor3.h index 64b3e33ea..2378ac865 100644 --- a/geometry/Tensor3.h +++ b/geometry/Tensor3.h @@ -6,7 +6,7 @@ */ #pragma once -#include "tensors.h" +#include namespace tensors { diff --git a/geometry/Tensor3Expression.h b/geometry/Tensor3Expression.h index 3fbe0c516..e219138bb 100644 --- a/geometry/Tensor3Expression.h +++ b/geometry/Tensor3Expression.h @@ -8,7 +8,7 @@ #pragma once #include -#include "tensors.h" +#include namespace tensors { diff --git a/geometry/Tensor4.h b/geometry/Tensor4.h index 8656bfdb4..a52922fe3 100644 --- a/geometry/Tensor4.h +++ b/geometry/Tensor4.h @@ -6,7 +6,7 @@ */ #pragma once -#include "tensors.h" +#include namespace tensors { diff --git a/geometry/Tensor5.h b/geometry/Tensor5.h index ebacdfea8..ae91df86e 100644 --- a/geometry/Tensor5.h +++ b/geometry/Tensor5.h @@ -6,7 +6,7 @@ */ #pragma once -#include "tensors.h" +#include namespace tensors { diff --git a/geometry/Tensor5Expression.h b/geometry/Tensor5Expression.h index cc187a3b5..4a32a3850 100644 --- a/geometry/Tensor5Expression.h +++ b/geometry/Tensor5Expression.h @@ -8,7 +8,7 @@ #pragma once #include -#include "tensors.h" +#include namespace tensors { diff --git a/geometry/projectiveGeometry.cpp b/geometry/projectiveGeometry.cpp index dfbb2f95a..f55c0f4e6 100644 --- a/geometry/projectiveGeometry.cpp +++ b/geometry/projectiveGeometry.cpp @@ -6,8 +6,8 @@ */ #include -#include "tensorInterface.h" -#include "projectiveGeometry.h" +#include +#include namespace gtsam { diff --git a/geometry/projectiveGeometry.h b/geometry/projectiveGeometry.h index 076817919..7bb10ec91 100644 --- a/geometry/projectiveGeometry.h +++ b/geometry/projectiveGeometry.h @@ -8,7 +8,7 @@ #pragma once #include -#include "tensors.h" +#include namespace gtsam { diff --git a/geometry/tensorInterface.cpp b/geometry/tensorInterface.cpp index f5a0c3c8b..8f26e61ee 100644 --- a/geometry/tensorInterface.cpp +++ b/geometry/tensorInterface.cpp @@ -5,7 +5,7 @@ * @author: Frank Dellaert */ -#include "tensorInterface.h" +#include using namespace std; using namespace tensors; diff --git a/geometry/tensorInterface.h b/geometry/tensorInterface.h index c96adf1bf..67c125128 100644 --- a/geometry/tensorInterface.h +++ b/geometry/tensorInterface.h @@ -7,8 +7,8 @@ #pragma once -#include "tensors.h" -#include "Matrix.h" +#include +#include namespace gtsam { diff --git a/geometry/tensors.h b/geometry/tensors.h index b7712f02c..36f00b6ab 100644 --- a/geometry/tensors.h +++ b/geometry/tensors.h @@ -17,17 +17,17 @@ namespace tensors { } // namespace tensors // Expression templates -#include "Tensor1Expression.h" -#include "Tensor2Expression.h" -#include "Tensor3Expression.h" +#include +#include +#include // Tensor4 not needed so far -#include "Tensor5Expression.h" +#include // Actual tensor classes -#include "Tensor1.h" -#include "Tensor2.h" -#include "Tensor3.h" -#include "Tensor4.h" -#include "Tensor5.h" +#include +#include +#include +#include +#include diff --git a/geometry/tests/testCal3_S2.cpp b/geometry/tests/testCal3_S2.cpp index d27b03bd9..d67d389fe 100644 --- a/geometry/tests/testCal3_S2.cpp +++ b/geometry/tests/testCal3_S2.cpp @@ -3,9 +3,9 @@ * @brief Unit tests for transform derivatives */ -#include -#include "numericalDerivative.h" -#include "Cal3_S2.h" +#include +#include +#include using namespace gtsam; diff --git a/geometry/tests/testCalibratedCamera.cpp b/geometry/tests/testCalibratedCamera.cpp index c48fb10ea..e7148d565 100644 --- a/geometry/tests/testCalibratedCamera.cpp +++ b/geometry/tests/testCalibratedCamera.cpp @@ -6,9 +6,9 @@ #include -#include -#include "numericalDerivative.h" -#include "CalibratedCamera.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/geometry/tests/testHomography2.cpp b/geometry/tests/testHomography2.cpp index 9a45c9799..68fc9f3a5 100644 --- a/geometry/tests/testHomography2.cpp +++ b/geometry/tests/testHomography2.cpp @@ -10,13 +10,13 @@ #include // for operator += using namespace boost::assign; -#include +#include -#include "Testable.h" -#include "tensors.h" -#include "tensorInterface.h" -#include "projectiveGeometry.h" -#include "Pose3.h" +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; @@ -139,7 +139,7 @@ namespace gtsam { } } -#include "numericalDerivative.h" +#include /* ************************************************************************* */ TEST( Homography2, patchH) diff --git a/geometry/tests/testPoint2.cpp b/geometry/tests/testPoint2.cpp index d1eb6e7ef..9dee8f05d 100644 --- a/geometry/tests/testPoint2.cpp +++ b/geometry/tests/testPoint2.cpp @@ -4,8 +4,8 @@ * @author Frank Dellaert **/ -#include -#include "Point2.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/geometry/tests/testPoint3.cpp b/geometry/tests/testPoint3.cpp index d9f0e708a..2ccd67b1c 100644 --- a/geometry/tests/testPoint3.cpp +++ b/geometry/tests/testPoint3.cpp @@ -3,8 +3,8 @@ * @brief Unit tests for Point3 class */ -#include -#include "Point3.h" +#include +#include using namespace gtsam; diff --git a/geometry/tests/testPose2.cpp b/geometry/tests/testPose2.cpp index b5d2adc3e..53de49fa9 100644 --- a/geometry/tests/testPose2.cpp +++ b/geometry/tests/testPose2.cpp @@ -4,12 +4,12 @@ */ #include -#include +#include #include -#include "numericalDerivative.h" -#include "Pose2.h" -#include "Point2.h" -#include "Rot2.h" +#include +#include +#include +#include using namespace gtsam; using namespace std; diff --git a/geometry/tests/testPose3.cpp b/geometry/tests/testPose3.cpp index 83f942b12..28199167d 100644 --- a/geometry/tests/testPose3.cpp +++ b/geometry/tests/testPose3.cpp @@ -4,9 +4,9 @@ */ #include -#include -#include "numericalDerivative.h" -#include "Pose3.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/geometry/tests/testRot2.cpp b/geometry/tests/testRot2.cpp index 4304fb6b3..f2e8b9bac 100644 --- a/geometry/tests/testRot2.cpp +++ b/geometry/tests/testRot2.cpp @@ -4,9 +4,9 @@ * @author Frank Dellaert */ -#include -#include "numericalDerivative.h" -#include "Rot2.h" +#include +#include +#include using namespace gtsam; diff --git a/geometry/tests/testRot3.cpp b/geometry/tests/testRot3.cpp index 83ab4bf35..6791e36e0 100644 --- a/geometry/tests/testRot3.cpp +++ b/geometry/tests/testRot3.cpp @@ -4,11 +4,11 @@ * @author Alireza Fathi */ -#include +#include #include -#include "numericalDerivative.h" -#include "Point3.h" -#include "Rot3.h" +#include +#include +#include using namespace gtsam; diff --git a/geometry/tests/testSimpleCamera.cpp b/geometry/tests/testSimpleCamera.cpp index 2f2ac89c2..0992d5f3a 100644 --- a/geometry/tests/testSimpleCamera.cpp +++ b/geometry/tests/testSimpleCamera.cpp @@ -7,9 +7,9 @@ #include #include -#include -#include "numericalDerivative.h" -#include "SimpleCamera.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/geometry/tests/testStereoCamera.cpp b/geometry/tests/testStereoCamera.cpp index ae24c68c7..3d7731f33 100644 --- a/geometry/tests/testStereoCamera.cpp +++ b/geometry/tests/testStereoCamera.cpp @@ -5,9 +5,9 @@ * @author Chris Beall */ -#include -#include -#include "StereoCamera.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/geometry/tests/testTensors.cpp b/geometry/tests/testTensors.cpp index ef25b39f5..0c19eb3c7 100644 --- a/geometry/tests/testTensors.cpp +++ b/geometry/tests/testTensors.cpp @@ -10,11 +10,11 @@ #include // for operator += using namespace boost::assign; -#include +#include -#include "tensors.h" -#include "tensorInterface.h" -#include "projectiveGeometry.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/geometry/tests/testTrifocal.cpp b/geometry/tests/testTrifocal.cpp index dd32656e3..b7b706ece 100644 --- a/geometry/tests/testTrifocal.cpp +++ b/geometry/tests/testTrifocal.cpp @@ -10,11 +10,11 @@ #include // for operator += using namespace boost::assign; -#include +#include -#include "tensors.h" -#include "tensorInterface.h" -#include "projectiveGeometry.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/geometry/timeCalibratedCamera.cpp b/geometry/timeCalibratedCamera.cpp index 34251e0b9..ce016dc8f 100644 --- a/geometry/timeCalibratedCamera.cpp +++ b/geometry/timeCalibratedCamera.cpp @@ -7,7 +7,7 @@ #include #include -#include "CalibratedCamera.h" +#include using namespace std; using namespace gtsam; diff --git a/geometry/timeRot3.cpp b/geometry/timeRot3.cpp index 51c62183c..d67e328d6 100644 --- a/geometry/timeRot3.cpp +++ b/geometry/timeRot3.cpp @@ -7,7 +7,7 @@ #include #include -#include "Rot3.h" +#include using namespace std; using namespace gtsam; diff --git a/inference/BayesNet-inl.h b/inference/BayesNet-inl.h index 0680bc703..4f5f0f169 100644 --- a/inference/BayesNet-inl.h +++ b/inference/BayesNet-inl.h @@ -14,8 +14,8 @@ #include // for += using namespace boost::assign; -#include "Ordering.h" -#include "BayesNet.h" +#include +#include //#include "FactorGraph-inl.h" //#include "Conditional.h" diff --git a/inference/BayesNet.h b/inference/BayesNet.h index 462874a33..647461f31 100644 --- a/inference/BayesNet.h +++ b/inference/BayesNet.h @@ -13,8 +13,8 @@ #include #include -#include "Testable.h" -#include "Key.h" +#include +#include namespace gtsam { diff --git a/inference/BayesTree-inl.h b/inference/BayesTree-inl.h index 79f57a9f2..72409ba65 100644 --- a/inference/BayesTree-inl.h +++ b/inference/BayesTree-inl.h @@ -15,11 +15,11 @@ #include using namespace boost::assign; -#include "Conditional.h" -#include "BayesTree.h" -#include "Ordering.h" -#include "inference-inl.h" -#include "Key.h" +#include +#include +#include +#include +#include namespace gtsam { diff --git a/inference/BayesTree.h b/inference/BayesTree.h index a2b5fc903..d89af82f2 100644 --- a/inference/BayesTree.h +++ b/inference/BayesTree.h @@ -14,11 +14,11 @@ #include #include -#include "Testable.h" -#include "FactorGraph.h" -#include "BayesNet.h" -#include "Key.h" -#include "IndexTable.h" +#include +#include +#include +#include +#include namespace gtsam { diff --git a/inference/BinaryConditional.h b/inference/BinaryConditional.h index 20a64643f..5f2d3892c 100644 --- a/inference/BinaryConditional.h +++ b/inference/BinaryConditional.h @@ -15,9 +15,9 @@ #include // TODO: make cpp file #include #include -#include "Conditional.h" -#include "Key.h" -#include "SymbolMap.h" +#include +#include +#include namespace gtsam { diff --git a/inference/ClusterTree-inl.h b/inference/ClusterTree-inl.h index 577d051d0..74308594d 100644 --- a/inference/ClusterTree-inl.h +++ b/inference/ClusterTree-inl.h @@ -10,7 +10,7 @@ #include -#include "ClusterTree.h" +#include namespace gtsam { diff --git a/inference/ClusterTree.h b/inference/ClusterTree.h index 4e66088a1..4310696e3 100644 --- a/inference/ClusterTree.h +++ b/inference/ClusterTree.h @@ -9,7 +9,7 @@ #pragma once #include -#include "Ordering.h" +#include namespace gtsam { diff --git a/inference/Conditional.h b/inference/Conditional.h index b6641888e..d2477b176 100644 --- a/inference/Conditional.h +++ b/inference/Conditional.h @@ -12,8 +12,8 @@ #include #include #include -#include "Testable.h" -#include "Key.h" +#include +#include namespace gtsam { diff --git a/inference/EliminationTree-inl.h b/inference/EliminationTree-inl.h index 43e0e3e90..11677e2f1 100644 --- a/inference/EliminationTree-inl.h +++ b/inference/EliminationTree-inl.h @@ -11,7 +11,7 @@ #include #include #include -#include "EliminationTree.h" +#include namespace gtsam { diff --git a/inference/EliminationTree.h b/inference/EliminationTree.h index 6dd367731..b0d61f7e4 100644 --- a/inference/EliminationTree.h +++ b/inference/EliminationTree.h @@ -9,8 +9,8 @@ #pragma once #include -#include "IndexTable.h" -#include "ClusterTree.h" +#include +#include namespace gtsam { diff --git a/inference/Factor.h b/inference/Factor.h index 3d15f02e4..d6d82bb3b 100644 --- a/inference/Factor.h +++ b/inference/Factor.h @@ -12,9 +12,9 @@ #include #include // for noncopyable -#include "Testable.h" -#include "Key.h" -#include "SymbolMap.h" +#include +#include +#include namespace gtsam { diff --git a/inference/FactorGraph-inl.h b/inference/FactorGraph-inl.h index 56243a894..20cc8b55e 100644 --- a/inference/FactorGraph-inl.h +++ b/inference/FactorGraph-inl.h @@ -20,11 +20,11 @@ #include #include #include -#include "ccolamd.h" -#include "Ordering.h" -#include "FactorGraph.h" -#include "graph-inl.h" -#include "DSF.h" +#include +#include +#include +#include +#include #define INSTANTIATE_FACTOR_GRAPH(F) \ template class FactorGraph; \ diff --git a/inference/FactorGraph.h b/inference/FactorGraph.h index b221ba09b..2262006c2 100644 --- a/inference/FactorGraph.h +++ b/inference/FactorGraph.h @@ -16,11 +16,11 @@ #include #include -#include "Testable.h" -#include "BayesNet.h" -#include "graph.h" -#include "Key.h" -#include "SymbolMap.h" +#include +#include +#include +#include +#include namespace gtsam { diff --git a/inference/ISAM-inl.h b/inference/ISAM-inl.h index c984d5c2e..9257da423 100644 --- a/inference/ISAM-inl.h +++ b/inference/ISAM-inl.h @@ -8,9 +8,9 @@ #include // for operator += using namespace boost::assign; -#include "Conditional.h" -#include "ISAM.h" -#include "BayesTree-inl.h" +#include +#include +#include namespace gtsam { diff --git a/inference/ISAM.h b/inference/ISAM.h index de19dfa04..6e75231cd 100644 --- a/inference/ISAM.h +++ b/inference/ISAM.h @@ -15,10 +15,10 @@ #include #include -#include "Testable.h" -#include "FactorGraph.h" -#include "BayesNet.h" -#include "BayesTree.h" +#include +#include +#include +#include namespace gtsam { diff --git a/inference/ISAM2-inl.h b/inference/ISAM2-inl.h index 2f0b4e4c1..7fb73b6df 100644 --- a/inference/ISAM2-inl.h +++ b/inference/ISAM2-inl.h @@ -10,13 +10,13 @@ using namespace boost::assign; #include -#include "NonlinearFactorGraph-inl.h" -#include "GaussianFactor.h" -#include "VectorConfig.h" +#include +#include +#include -#include "Conditional.h" -#include "BayesTree-inl.h" -#include "ISAM2.h" +#include +#include +#include namespace gtsam { diff --git a/inference/ISAM2.h b/inference/ISAM2.h index eaed35fd4..569ab5f66 100644 --- a/inference/ISAM2.h +++ b/inference/ISAM2.h @@ -15,13 +15,13 @@ #include #include -#include "Testable.h" -#include "FactorGraph.h" -#include "NonlinearFactorGraph.h" -#include "BayesNet.h" -#include "BayesTree.h" -#include "Key.h" -#include "SymbolMap.h" +#include +#include +#include +#include +#include +#include +#include namespace gtsam { diff --git a/inference/IndexTable.h b/inference/IndexTable.h index e219b26f8..424c6dda1 100644 --- a/inference/IndexTable.h +++ b/inference/IndexTable.h @@ -9,7 +9,7 @@ #include #include // TODO should not be in header -#include "Testable.h" +#include namespace gtsam { diff --git a/inference/JunctionTree-inl.h b/inference/JunctionTree-inl.h index c1a294746..3af48b871 100644 --- a/inference/JunctionTree-inl.h +++ b/inference/JunctionTree-inl.h @@ -10,9 +10,9 @@ #include -#include "SymbolicFactorGraph.h" -#include "BayesTree-inl.h" -#include "JunctionTree.h" +#include +#include +#include namespace gtsam { diff --git a/inference/JunctionTree.h b/inference/JunctionTree.h index a98a30b12..d9a1d7758 100644 --- a/inference/JunctionTree.h +++ b/inference/JunctionTree.h @@ -10,9 +10,9 @@ #include #include -#include "BayesTree.h" -#include "ClusterTree.h" -#include "SymbolicConditional.h" +#include +#include +#include namespace gtsam { diff --git a/inference/Key.h b/inference/Key.h index 927211831..dfd7f3574 100644 --- a/inference/Key.h +++ b/inference/Key.h @@ -16,7 +16,7 @@ #include #endif -#include "Testable.h" +#include #define ALPHA '\224' diff --git a/inference/Makefile.am b/inference/Makefile.am index 7a1e7ac11..9754151a4 100644 --- a/inference/Makefile.am +++ b/inference/Makefile.am @@ -2,6 +2,10 @@ # GTSAM core functionality: base classes for inference, as well as symbolic and discrete #---------------------------------------------------------------------------------------------------- +# 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 + headers = sources = check_PROGRAMS = @@ -50,10 +54,11 @@ noinst_PROGRAMS = tests/timeSymbolMaps # The headers are installed in $(includedir)/gtsam: #---------------------------------------------------------------------------------------------------- headers += $(sources:.cpp=.h) -pkginclude_HEADERS = $(headers) +inferencedir = $(pkgincludedir)/inference +inference_HEADERS = $(headers) noinst_LTLIBRARIES = libinference.la libinference_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/colamd -I$(top_srcdir)/base +AM_CPPFLAGS = -I$(boost) -I$(BORG_SRCROOT) AM_CXXFLAGS = #---------------------------------------------------------------------------------------------------- diff --git a/inference/Ordering.cpp b/inference/Ordering.cpp index bd1adfbba..f6d11fc2c 100644 --- a/inference/Ordering.cpp +++ b/inference/Ordering.cpp @@ -9,7 +9,7 @@ #include #include -#include "Ordering.h" +#include using namespace std; using namespace gtsam; diff --git a/inference/Ordering.h b/inference/Ordering.h index e453de0bd..16af771d2 100644 --- a/inference/Ordering.h +++ b/inference/Ordering.h @@ -9,8 +9,8 @@ #include #include #include -#include "Testable.h" -#include "Key.h" +#include +#include namespace gtsam { diff --git a/inference/SymbolMap.h b/inference/SymbolMap.h index 0ebf2b2c4..f31c1bdb7 100644 --- a/inference/SymbolMap.h +++ b/inference/SymbolMap.h @@ -11,7 +11,7 @@ #define GTSAM_SYMBOL_BINARY #define GTSAM_SYMBOL_SPECIAL -#include "Key.h" +#include #include #include diff --git a/inference/SymbolicBayesNet.cpp b/inference/SymbolicBayesNet.cpp index 5e0b33744..3394e2bfe 100644 --- a/inference/SymbolicBayesNet.cpp +++ b/inference/SymbolicBayesNet.cpp @@ -4,8 +4,8 @@ * @author Frank Dellaert */ -#include "SymbolicBayesNet.h" -#include "BayesNet-inl.h" +#include +#include using namespace std; diff --git a/inference/SymbolicBayesNet.h b/inference/SymbolicBayesNet.h index d36448b39..043a42192 100644 --- a/inference/SymbolicBayesNet.h +++ b/inference/SymbolicBayesNet.h @@ -12,10 +12,10 @@ #include #include -#include "Testable.h" -#include "BayesNet.h" -#include "SymbolicConditional.h" -#include "Key.h" +#include +#include +#include +#include namespace gtsam { diff --git a/inference/SymbolicConditional.h b/inference/SymbolicConditional.h index e9781cb6a..e737d3f9a 100644 --- a/inference/SymbolicConditional.h +++ b/inference/SymbolicConditional.h @@ -14,8 +14,8 @@ #include #include // TODO: make cpp file #include -#include "Conditional.h" -#include "Key.h" +#include +#include namespace gtsam { diff --git a/inference/SymbolicFactor.cpp b/inference/SymbolicFactor.cpp index fe9a174e8..92dd1c6ac 100644 --- a/inference/SymbolicFactor.cpp +++ b/inference/SymbolicFactor.cpp @@ -9,9 +9,9 @@ #include #include #include -#include "SymbolicConditional.h" -#include "SymbolicFactor.h" -#include "SymbolMap.h" +#include +#include +#include using namespace std; diff --git a/inference/SymbolicFactor.h b/inference/SymbolicFactor.h index 8f68d930c..28df051a0 100644 --- a/inference/SymbolicFactor.h +++ b/inference/SymbolicFactor.h @@ -12,9 +12,9 @@ #include #include #include -#include "Testable.h" -#include "Ordering.h" -#include "Key.h" +#include +#include +#include namespace gtsam { diff --git a/inference/SymbolicFactorGraph.cpp b/inference/SymbolicFactorGraph.cpp index cc8bd2d06..47d69e4f0 100644 --- a/inference/SymbolicFactorGraph.cpp +++ b/inference/SymbolicFactorGraph.cpp @@ -9,10 +9,10 @@ #include #include #include -#include "Ordering.h" -#include "SymbolicFactorGraph.h" -#include "SymbolicBayesNet.h" -#include "inference-inl.h" +#include +#include +#include +#include using namespace std; diff --git a/inference/SymbolicFactorGraph.h b/inference/SymbolicFactorGraph.h index 9920d37a4..1839e6ac3 100644 --- a/inference/SymbolicFactorGraph.h +++ b/inference/SymbolicFactorGraph.h @@ -9,10 +9,10 @@ #include #include -#include "FactorGraph.h" -#include "SymbolicFactor.h" -#include "SymbolicBayesNet.h" -#include "Key.h" +#include +#include +#include +#include namespace gtsam { diff --git a/inference/graph-inl.h b/inference/graph-inl.h index cd57185b7..3d5476ab7 100644 --- a/inference/graph-inl.h +++ b/inference/graph-inl.h @@ -10,7 +10,7 @@ #include #include -#include "graph.h" +#include using namespace std; diff --git a/inference/inference-inl.h b/inference/inference-inl.h index a29208970..8870e3fb2 100644 --- a/inference/inference-inl.h +++ b/inference/inference-inl.h @@ -6,10 +6,10 @@ #pragma once -#include "inference.h" -#include "FactorGraph-inl.h" -#include "BayesNet-inl.h" -#include "Key.h" +#include +#include +#include +#include using namespace std; diff --git a/inference/inference.h b/inference/inference.h index 7100f6378..9c7d89d09 100644 --- a/inference/inference.h +++ b/inference/inference.h @@ -7,9 +7,9 @@ #pragma once -#include "FactorGraph.h" -#include "BayesNet.h" -#include "Key.h" +#include +#include +#include namespace gtsam { diff --git a/inference/tests/testBayesTree.cpp b/inference/tests/testBayesTree.cpp index a101d6acc..b8f234005 100644 --- a/inference/tests/testBayesTree.cpp +++ b/inference/tests/testBayesTree.cpp @@ -9,13 +9,13 @@ #include // for operator += using namespace boost::assign; -#include +#include -#include "SymbolicBayesNet.h" -#include "SymbolicFactorGraph.h" -#include "Ordering.h" -#include "BayesTree-inl.h" -#include "IndexTable.h" +#include +#include +#include +#include +#include using namespace gtsam; diff --git a/inference/tests/testBinaryBayesNet.cpp b/inference/tests/testBinaryBayesNet.cpp index b51e4a763..ff6d9fc2a 100644 --- a/inference/tests/testBinaryBayesNet.cpp +++ b/inference/tests/testBinaryBayesNet.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include @@ -22,10 +22,10 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY -#include "BinaryConditional.h" -#include "BayesNet-inl.h" -#include "Ordering.h" -#include "SymbolMap.h" +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/inference/tests/testClusterTree.cpp b/inference/tests/testClusterTree.cpp index b47a75d76..74334e175 100644 --- a/inference/tests/testClusterTree.cpp +++ b/inference/tests/testClusterTree.cpp @@ -8,10 +8,10 @@ #include // for operator += using namespace boost::assign; -#include +#include -#include "SymbolicFactorGraph.h" -#include "ClusterTree-inl.h" +#include +#include using namespace gtsam; diff --git a/inference/tests/testEliminationTree.cpp b/inference/tests/testEliminationTree.cpp index 74e75be40..95aecfa2f 100644 --- a/inference/tests/testEliminationTree.cpp +++ b/inference/tests/testEliminationTree.cpp @@ -10,13 +10,13 @@ #include using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "SymbolicFactorGraph.h" -#include "ClusterTree-inl.h" -#include "EliminationTree-inl.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/inference/tests/testFactorGraph.cpp b/inference/tests/testFactorGraph.cpp index 05b76d219..f56b527fd 100644 --- a/inference/tests/testFactorGraph.cpp +++ b/inference/tests/testFactorGraph.cpp @@ -12,10 +12,10 @@ #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "SymbolicFactorGraph.h" +#include using namespace std; using namespace gtsam; diff --git a/inference/tests/testISAM.cpp b/inference/tests/testISAM.cpp index 53028809e..fe6c3cfc2 100644 --- a/inference/tests/testISAM.cpp +++ b/inference/tests/testISAM.cpp @@ -8,14 +8,14 @@ #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "SymbolicBayesNet.h" -#include "SymbolicFactorGraph.h" -#include "Ordering.h" -#include "ISAM-inl.h" +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/inference/tests/testJunctionTree.cpp b/inference/tests/testJunctionTree.cpp index 3ed077eff..37f1b751d 100644 --- a/inference/tests/testJunctionTree.cpp +++ b/inference/tests/testJunctionTree.cpp @@ -9,15 +9,15 @@ #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "SymbolicFactorGraph.h" -#include "JunctionTree.h" -#include "ClusterTree-inl.h" -#include "JunctionTree-inl.h" +#include +#include +#include +#include +#include using namespace gtsam; diff --git a/inference/tests/testKey.cpp b/inference/tests/testKey.cpp index 87ddad611..13e3d138c 100644 --- a/inference/tests/testKey.cpp +++ b/inference/tests/testKey.cpp @@ -6,8 +6,8 @@ #include // for operator += using namespace boost::assign; -#include -#include "Key.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/inference/tests/testOrdering.cpp b/inference/tests/testOrdering.cpp index 7e5ae193c..ec6a65d48 100644 --- a/inference/tests/testOrdering.cpp +++ b/inference/tests/testOrdering.cpp @@ -6,12 +6,12 @@ #include // for operator += using namespace boost::assign; -#include +#include // Magically turn strings into Symbols #define GTSAM_MAGIC_KEY -#include "Ordering.h" +#include using namespace std; using namespace gtsam; diff --git a/inference/tests/testSymbolicBayesNet.cpp b/inference/tests/testSymbolicBayesNet.cpp index cbe4e040c..09ed94635 100644 --- a/inference/tests/testSymbolicBayesNet.cpp +++ b/inference/tests/testSymbolicBayesNet.cpp @@ -8,13 +8,13 @@ #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "SymbolicBayesNet.h" -#include "SymbolicFactorGraph.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/inference/tests/testSymbolicFactor.cpp b/inference/tests/testSymbolicFactor.cpp index ad7636ed4..d66d78f53 100644 --- a/inference/tests/testSymbolicFactor.cpp +++ b/inference/tests/testSymbolicFactor.cpp @@ -4,9 +4,9 @@ * @author Frank Dellaert */ -#include +#include -#include "SymbolicFactor.h" +#include using namespace std; using namespace gtsam; diff --git a/inference/tests/testSymbolicFactorGraph.cpp b/inference/tests/testSymbolicFactorGraph.cpp index f4670ac93..0684ddc5a 100644 --- a/inference/tests/testSymbolicFactorGraph.cpp +++ b/inference/tests/testSymbolicFactorGraph.cpp @@ -7,14 +7,14 @@ #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "SymbolicFactorGraph.h" -#include "SymbolicBayesNet.h" -#include "FactorGraph-inl.h" +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/inference/tests/timeSymbolMaps.cpp b/inference/tests/timeSymbolMaps.cpp index 1f17c217b..30aece07e 100644 --- a/inference/tests/timeSymbolMaps.cpp +++ b/inference/tests/timeSymbolMaps.cpp @@ -12,7 +12,7 @@ #include #include -#include "Key.h" +#include using namespace std; using namespace boost; diff --git a/linear/BayesNetPreconditioner.cpp b/linear/BayesNetPreconditioner.cpp index 125903fc2..62a3e5039 100644 --- a/linear/BayesNetPreconditioner.cpp +++ b/linear/BayesNetPreconditioner.cpp @@ -5,7 +5,7 @@ */ #include -#include "BayesNetPreconditioner.h" +#include namespace gtsam { diff --git a/linear/BayesNetPreconditioner.h b/linear/BayesNetPreconditioner.h index 9c7f96a82..c31f05692 100644 --- a/linear/BayesNetPreconditioner.h +++ b/linear/BayesNetPreconditioner.h @@ -7,8 +7,8 @@ #ifndef BAYESNETPRECONDITIONER_H_ #define BAYESNETPRECONDITIONER_H_ -#include "GaussianFactorGraph.h" -#include "GaussianBayesNet.h" +#include +#include namespace gtsam { diff --git a/linear/Errors.cpp b/linear/Errors.cpp index 5bb564b5e..c452d1ad5 100644 --- a/linear/Errors.cpp +++ b/linear/Errors.cpp @@ -8,7 +8,7 @@ #include #include -#include "Errors.h" +#include using namespace std; diff --git a/linear/Errors.h b/linear/Errors.h index 9503086a8..0c78173af 100644 --- a/linear/Errors.h +++ b/linear/Errors.h @@ -10,8 +10,8 @@ #include -#include "Testable.h" -#include "Vector.h" +#include +#include namespace gtsam { diff --git a/linear/Factorization.h b/linear/Factorization.h index 381609bff..a9f537778 100644 --- a/linear/Factorization.h +++ b/linear/Factorization.h @@ -10,7 +10,7 @@ #pragma once #include -#include "GaussianFactorGraph.h" +#include namespace gtsam { diff --git a/linear/GaussianBayesNet.cpp b/linear/GaussianBayesNet.cpp index 4697c6ac8..86512bae5 100644 --- a/linear/GaussianBayesNet.cpp +++ b/linear/GaussianBayesNet.cpp @@ -8,15 +8,15 @@ #include #include -#include "GaussianBayesNet.h" -#include "VectorConfig.h" -#include "SymbolMap.h" +#include +#include +#include using namespace std; using namespace gtsam; // Explicitly instantiate so we don't have to include everywhere -#include "BayesNet-inl.h" +#include template class BayesNet; // trick from some reading group diff --git a/linear/GaussianBayesNet.h b/linear/GaussianBayesNet.h index 9322322ce..6cf2e7aa9 100644 --- a/linear/GaussianBayesNet.h +++ b/linear/GaussianBayesNet.h @@ -11,9 +11,9 @@ #include -#include "GaussianConditional.h" -#include "BayesNet.h" -#include "Key.h" +#include +#include +#include namespace gtsam { diff --git a/linear/GaussianConditional.cpp b/linear/GaussianConditional.cpp index b39fafed1..c210a9dec 100644 --- a/linear/GaussianConditional.cpp +++ b/linear/GaussianConditional.cpp @@ -6,8 +6,8 @@ #include #include -#include "Ordering.h" -#include "GaussianConditional.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/linear/GaussianConditional.h b/linear/GaussianConditional.h index d44b57b63..9cee2ba9a 100644 --- a/linear/GaussianConditional.h +++ b/linear/GaussianConditional.h @@ -15,11 +15,11 @@ #include #include -#include "Conditional.h" -#include "VectorConfig.h" -#include "Matrix.h" -#include "Key.h" -#include "SymbolMap.h" +#include +#include +#include +#include +#include namespace gtsam { diff --git a/linear/GaussianFactor.cpp b/linear/GaussianFactor.cpp index 9bbfb5b09..9a6abeace 100644 --- a/linear/GaussianFactor.cpp +++ b/linear/GaussianFactor.cpp @@ -9,10 +9,10 @@ #include // for 'insert()' #include // for operator += in Ordering -#include "Matrix.h" -#include "Ordering.h" -#include "GaussianConditional.h" -#include "GaussianFactor.h" +#include +#include +#include +#include using namespace std; using namespace boost::assign; diff --git a/linear/GaussianFactor.h b/linear/GaussianFactor.h index 938fcd227..805fd779d 100644 --- a/linear/GaussianFactor.h +++ b/linear/GaussianFactor.h @@ -16,13 +16,13 @@ #include #include -#include "Factor.h" -#include "Matrix.h" -#include "VectorConfig.h" -#include "SharedDiagonal.h" -#include "GaussianConditional.h" // Needed for MATLAB -#include "GaussianBayesNet.h" -#include "SymbolMap.h" +#include +#include +#include +#include +#include +#include +#include namespace gtsam { diff --git a/linear/GaussianFactorGraph.cpp b/linear/GaussianFactorGraph.cpp index 1cb0eb0bf..e4b3fabaa 100644 --- a/linear/GaussianFactorGraph.cpp +++ b/linear/GaussianFactorGraph.cpp @@ -11,12 +11,12 @@ #include #include // for operator += in Ordering -#include "GaussianFactorGraph.h" -#include "GaussianFactorSet.h" -#include "FactorGraph-inl.h" -#include "inference-inl.h" -#include "iterative.h" -#include "GaussianJunctionTree.h" +#include +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/linear/GaussianFactorGraph.h b/linear/GaussianFactorGraph.h index ac599e61a..46cfc5fa6 100644 --- a/linear/GaussianFactorGraph.h +++ b/linear/GaussianFactorGraph.h @@ -14,10 +14,10 @@ #include -#include "FactorGraph.h" -#include "Errors.h" -#include "GaussianFactor.h" -#include "GaussianBayesNet.h" // needed for MATLAB toolbox !! +#include +#include +#include +#include namespace gtsam { diff --git a/linear/GaussianFactorSet.h b/linear/GaussianFactorSet.h index aeb5d4cf2..8e35e8a28 100644 --- a/linear/GaussianFactorSet.h +++ b/linear/GaussianFactorSet.h @@ -8,7 +8,7 @@ #include #include -#include "GaussianFactor.h" +#include namespace gtsam { diff --git a/linear/GaussianISAM.cpp b/linear/GaussianISAM.cpp index bce605142..a21636b90 100644 --- a/linear/GaussianISAM.cpp +++ b/linear/GaussianISAM.cpp @@ -4,13 +4,13 @@ * @author Michael Kaess */ -#include "GaussianISAM.h" +#include using namespace std; using namespace gtsam; // Explicitly instantiate so we don't have to include everywhere -#include "ISAM-inl.h" +#include template class ISAM; namespace gtsam { diff --git a/linear/GaussianISAM.h b/linear/GaussianISAM.h index ef1f15e22..88468d7a7 100644 --- a/linear/GaussianISAM.h +++ b/linear/GaussianISAM.h @@ -8,8 +8,8 @@ #pragma once -#include "ISAM.h" -#include "GaussianConditional.h" +#include +#include namespace gtsam { diff --git a/linear/GaussianJunctionTree.cpp b/linear/GaussianJunctionTree.cpp index 5f6e772ee..b84d24f69 100644 --- a/linear/GaussianJunctionTree.cpp +++ b/linear/GaussianJunctionTree.cpp @@ -8,9 +8,9 @@ #include -#include "ClusterTree-inl.h" -#include "JunctionTree-inl.h" -#include "GaussianJunctionTree.h" +#include +#include +#include namespace gtsam { diff --git a/linear/GaussianJunctionTree.h b/linear/GaussianJunctionTree.h index a83801ac2..7c88d881e 100644 --- a/linear/GaussianJunctionTree.h +++ b/linear/GaussianJunctionTree.h @@ -8,9 +8,9 @@ #pragma once -#include "JunctionTree.h" -#include "GaussianConditional.h" -#include "GaussianFactorGraph.h" +#include +#include +#include namespace gtsam { diff --git a/linear/Makefile.am b/linear/Makefile.am index 13afc1cb6..8fed48825 100644 --- a/linear/Makefile.am +++ b/linear/Makefile.am @@ -2,6 +2,10 @@ # GTSAM linear: inference in Gaussian factor graphs #---------------------------------------------------------------------------------------------------- +# 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 + headers = sources = check_PROGRAMS = @@ -38,10 +42,11 @@ noinst_PROGRAMS = tests/timeGaussianFactor tests/timeVectorConfig # The headers are installed in $(includedir)/gtsam: #---------------------------------------------------------------------------------------------------- headers += $(sources:.cpp=.h) -pkginclude_HEADERS = $(headers) +lineardir = $(pkgincludedir)/linear +linear_HEADERS = $(headers) noinst_LTLIBRARIES = liblinear.la liblinear_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/colamd -I$(top_srcdir)/base -I$(top_srcdir)/inference +AM_CPPFLAGS = -I$(boost) -I$(BORG_SRCROOT) AM_CXXFLAGS = #---------------------------------------------------------------------------------------------------- diff --git a/linear/NoiseModel.cpp b/linear/NoiseModel.cpp index f57a22271..479ad0a1a 100644 --- a/linear/NoiseModel.cpp +++ b/linear/NoiseModel.cpp @@ -18,9 +18,9 @@ #include #include -#include "NoiseModel.h" -#include "SharedDiagonal.h" -#include "SPQRUtil.h" +#include +#include +#include namespace ublas = boost::numeric::ublas; typedef ublas::matrix_column column; diff --git a/linear/NoiseModel.h b/linear/NoiseModel.h index d069e0861..7060c666a 100644 --- a/linear/NoiseModel.h +++ b/linear/NoiseModel.h @@ -9,9 +9,9 @@ #pragma once #include -#include "Testable.h" -#include "Vector.h" -#include "Matrix.h" +#include +#include +#include namespace gtsam { diff --git a/linear/SharedDiagonal.h b/linear/SharedDiagonal.h index 247b0b52e..2fde2eda8 100644 --- a/linear/SharedDiagonal.h +++ b/linear/SharedDiagonal.h @@ -7,7 +7,7 @@ #pragma once -#include "NoiseModel.h" +#include namespace gtsam { // note, deliberately not in noiseModel namespace diff --git a/linear/SharedGaussian.h b/linear/SharedGaussian.h index ad63aa94c..3b046eed4 100644 --- a/linear/SharedGaussian.h +++ b/linear/SharedGaussian.h @@ -7,7 +7,7 @@ #pragma once -#include "NoiseModel.h" +#include namespace gtsam { // note, deliberately not in noiseModel namespace diff --git a/linear/SubgraphPreconditioner.cpp b/linear/SubgraphPreconditioner.cpp index 69734ca31..08009a019 100644 --- a/linear/SubgraphPreconditioner.cpp +++ b/linear/SubgraphPreconditioner.cpp @@ -5,7 +5,7 @@ */ #include -#include "SubgraphPreconditioner.h" +#include using namespace std; diff --git a/linear/SubgraphPreconditioner.h b/linear/SubgraphPreconditioner.h index 995e2ca79..96c122080 100644 --- a/linear/SubgraphPreconditioner.h +++ b/linear/SubgraphPreconditioner.h @@ -6,9 +6,9 @@ #pragma once -#include "GaussianFactorGraph.h" -#include "GaussianBayesNet.h" -#include "Ordering.h" +#include +#include +#include namespace gtsam { diff --git a/linear/SubgraphSolver-inl.h b/linear/SubgraphSolver-inl.h index 8daa1eac8..845257d69 100644 --- a/linear/SubgraphSolver-inl.h +++ b/linear/SubgraphSolver-inl.h @@ -9,11 +9,11 @@ #pragma once #include -#include "SubgraphSolver.h" +#include -#include "graph-inl.h" -#include "iterative-inl.h" -#include "FactorGraph-inl.h" +#include +#include +#include using namespace std; diff --git a/linear/SubgraphSolver.h b/linear/SubgraphSolver.h index da9127d26..8510a6e46 100644 --- a/linear/SubgraphSolver.h +++ b/linear/SubgraphSolver.h @@ -6,10 +6,10 @@ #pragma once -#include "GaussianFactorGraph.h" -#include "GaussianBayesNet.h" -#include "Ordering.h" -#include "SubgraphPreconditioner.h" +#include +#include +#include +#include namespace gtsam { diff --git a/linear/VectorBTree.cpp b/linear/VectorBTree.cpp index 40d7c0286..2208256a8 100644 --- a/linear/VectorBTree.cpp +++ b/linear/VectorBTree.cpp @@ -7,7 +7,7 @@ #include #include -#include "VectorBTree.h" +#include using namespace std; diff --git a/linear/VectorBTree.h b/linear/VectorBTree.h index 58b8a561c..d83e9f1a6 100644 --- a/linear/VectorBTree.h +++ b/linear/VectorBTree.h @@ -12,10 +12,10 @@ #include #include -#include "Testable.h" -#include "Vector.h" -#include "Key.h" -#include "BTree.h" +#include +#include +#include +#include namespace gtsam { diff --git a/linear/VectorConfig.h b/linear/VectorConfig.h index b729b3a78..caa038cf2 100644 --- a/linear/VectorConfig.h +++ b/linear/VectorConfig.h @@ -29,12 +29,12 @@ // we use define and not typedefs as typdefs cannot be forward declared #ifdef VECTORBTREE -#include "VectorBTree.h" +#include #define VectorConfig VectorBTree #else -#include "VectorMap.h" +#include #define VectorConfig VectorMap #endif diff --git a/linear/VectorMap.cpp b/linear/VectorMap.cpp index 013c8b6e3..dc7715447 100644 --- a/linear/VectorMap.cpp +++ b/linear/VectorMap.cpp @@ -8,7 +8,7 @@ #include #include -#include "VectorMap.h" +#include // trick from some reading group #define FOREACH_PAIR( KEY, VAL, COL) BOOST_FOREACH (boost::tie(KEY,VAL),COL) diff --git a/linear/VectorMap.h b/linear/VectorMap.h index 650568115..17314d950 100644 --- a/linear/VectorMap.h +++ b/linear/VectorMap.h @@ -12,10 +12,10 @@ #include #include -#include "Testable.h" -#include "Vector.h" -#include "Key.h" -#include "SymbolMap.h" +#include +#include +#include +#include namespace gtsam { diff --git a/linear/iterative-inl.h b/linear/iterative-inl.h index cb325b6df..7d06befa5 100644 --- a/linear/iterative-inl.h +++ b/linear/iterative-inl.h @@ -7,8 +7,8 @@ #pragma once -#include "GaussianFactorGraph.h" -#include "iterative.h" +#include +#include using namespace std; diff --git a/linear/iterative.cpp b/linear/iterative.cpp index 375642f0d..8983c0309 100644 --- a/linear/iterative.cpp +++ b/linear/iterative.cpp @@ -6,10 +6,10 @@ */ #include -#include "Vector.h" -#include "Matrix.h" -#include "GaussianFactorGraph.h" -#include "iterative-inl.h" +#include +#include +#include +#include using namespace std; diff --git a/linear/iterative.h b/linear/iterative.h index 1db7c0dbb..14935a783 100644 --- a/linear/iterative.h +++ b/linear/iterative.h @@ -7,7 +7,7 @@ #pragma once -#include "Matrix.h" +#include namespace gtsam { diff --git a/linear/tests/testBayesNetPreconditioner.cpp b/linear/tests/testBayesNetPreconditioner.cpp index f9cc79613..60989e7e5 100644 --- a/linear/tests/testBayesNetPreconditioner.cpp +++ b/linear/tests/testBayesNetPreconditioner.cpp @@ -6,13 +6,13 @@ #include #include -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "BayesNetPreconditioner.h" -#include "iterative-inl.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/linear/tests/testErrors.cpp b/linear/tests/testErrors.cpp index a47f05c02..d17dbe79c 100644 --- a/linear/tests/testErrors.cpp +++ b/linear/tests/testErrors.cpp @@ -8,8 +8,8 @@ #include // for += using namespace boost::assign; -#include -#include "Errors.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/linear/tests/testGaussianConditional.cpp b/linear/tests/testGaussianConditional.cpp index 53e2f61be..3e5c77b6c 100644 --- a/linear/tests/testGaussianConditional.cpp +++ b/linear/tests/testGaussianConditional.cpp @@ -7,7 +7,7 @@ /*STL/C++*/ #include #include -#include +#include #ifdef HAVE_BOOST_SERIALIZATION #include @@ -16,8 +16,8 @@ #define GTSAM_MAGIC_KEY -#include "Matrix.h" -#include "GaussianConditional.h" +#include +#include using namespace gtsam; diff --git a/linear/tests/testGaussianFactor.cpp b/linear/tests/testGaussianFactor.cpp index a60784813..3dbd1e423 100644 --- a/linear/tests/testGaussianFactor.cpp +++ b/linear/tests/testGaussianFactor.cpp @@ -13,15 +13,15 @@ #include // for insert using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Matrix.h" -#include "Ordering.h" -#include "GaussianFactorGraph.h" -#include "SharedDiagonal.h" -#include "inference-inl.h" +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/linear/tests/testGaussianJunctionTree.cpp b/linear/tests/testGaussianJunctionTree.cpp index 3ef2f83b1..cb444973e 100644 --- a/linear/tests/testGaussianJunctionTree.cpp +++ b/linear/tests/testGaussianJunctionTree.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include #include // for operator += @@ -15,9 +15,9 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "GaussianJunctionTree.h" -#include "BayesTree-inl.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/linear/tests/testNoiseModel.cpp b/linear/tests/testNoiseModel.cpp index debb58ef1..32137c151 100644 --- a/linear/tests/testNoiseModel.cpp +++ b/linear/tests/testNoiseModel.cpp @@ -6,13 +6,13 @@ * Author: Frank Dellaert */ -#include +#include #include #include -#include "NoiseModel.h" -#include "SharedGaussian.h" -#include "SharedDiagonal.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/linear/tests/testVectorBTree.cpp b/linear/tests/testVectorBTree.cpp index 9eb264233..47feaf745 100644 --- a/linear/tests/testVectorBTree.cpp +++ b/linear/tests/testVectorBTree.cpp @@ -19,9 +19,9 @@ using namespace boost::assign; // bring 'operator+=()' into scope #include #endif //HAVE_BOOST_SERIALIZATION -#include -#include "Matrix.h" -#include "VectorBTree.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/linear/tests/testVectorMap.cpp b/linear/tests/testVectorMap.cpp index 6d7d2fa8f..50d99c60f 100644 --- a/linear/tests/testVectorMap.cpp +++ b/linear/tests/testVectorMap.cpp @@ -17,9 +17,9 @@ #define GTSAM_MAGIC_KEY -#include -#include "Matrix.h" -#include "VectorMap.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/linear/tests/timeGaussianFactor.cpp b/linear/tests/timeGaussianFactor.cpp index de6ef671d..2c3b062ca 100644 --- a/linear/tests/timeGaussianFactor.cpp +++ b/linear/tests/timeGaussianFactor.cpp @@ -15,10 +15,10 @@ using namespace std; #include #include // for operator += in Ordering -#include "Matrix.h" -#include "GaussianFactor.h" -#include "GaussianConditional.h" -#include "Ordering.h" +#include +#include +#include +#include using namespace gtsam; using namespace boost::assign; diff --git a/linear/tests/timeVectorConfig.cpp b/linear/tests/timeVectorConfig.cpp index 970e3bed1..bd1e3881c 100644 --- a/linear/tests/timeVectorConfig.cpp +++ b/linear/tests/timeVectorConfig.cpp @@ -6,8 +6,8 @@ #include #include -#include "VectorBTree.h" -#include "VectorMap.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/nonlinear/ConstraintOptimizer.cpp b/nonlinear/ConstraintOptimizer.cpp index 67c36c2b9..0dea97c25 100644 --- a/nonlinear/ConstraintOptimizer.cpp +++ b/nonlinear/ConstraintOptimizer.cpp @@ -5,7 +5,7 @@ /** IMPORTANT NOTE: this file is only compiled when LDL is available */ -#include +#include using namespace std; using namespace gtsam; diff --git a/nonlinear/ConstraintOptimizer.h b/nonlinear/ConstraintOptimizer.h index b7051223c..4ae5c59de 100644 --- a/nonlinear/ConstraintOptimizer.h +++ b/nonlinear/ConstraintOptimizer.h @@ -14,7 +14,7 @@ #pragma once #include -#include +#include namespace gtsam { diff --git a/nonlinear/FusionTupleConfig.h b/nonlinear/FusionTupleConfig.h index 3846b9351..543e45cbc 100644 --- a/nonlinear/FusionTupleConfig.h +++ b/nonlinear/FusionTupleConfig.h @@ -15,8 +15,8 @@ #include #include -#include "Testable.h" -#include "LieConfig.h" +#include +#include namespace gtsam { @@ -36,6 +36,117 @@ protected: /** the underlying tuple storing everything */ Configs base_tuple_; +private: + /** helper structs to make use of fusion algorithms */ + struct size_helper { + typedef size_t result_type; + template + size_t operator()(const T& t, const size_t& s) const { + return s + t.size(); + } + }; + + struct dim_helper { + typedef size_t result_type; + template + size_t operator()(const T& t, const size_t& s) const { + return s + t.dim(); + } + }; + + struct zero_helper { + typedef VectorConfig result_type; + template + result_type operator()(const T& t, const result_type& s) const { + result_type new_s(s); + new_s.insert(t.zero()); + return new_s; + } + }; + + struct update_helper { + typedef Configs result_type; + template + result_type operator()(const T& t, const result_type& s) const { + result_type new_s(s); + boost::fusion::at_key(new_s).update(t); + return new_s; + } + }; + + struct expmap_helper { + typedef FusionTupleConfig result_type; + VectorConfig delta; + expmap_helper(const VectorConfig& d) : delta(d) {} + template + result_type operator()(const T& t, const result_type& s) const { + result_type new_s(s); + boost::fusion::at_key(new_s.base_tuple_) = T(gtsam::expmap(t, delta)); + return new_s; + } + }; + + struct logmap_helper { + typedef VectorConfig result_type; + template + result_type operator()(const T& t, const result_type& s) const { + result_type new_s(s); + new_s.insert(gtsam::logmap(boost::fusion::at_c<0>(t), boost::fusion::at_c<1>(t))); + return new_s; + } + }; + + struct empty_helper { + template + bool operator()(T t) const { + return t.empty(); + } + }; + + struct print_helper { + template + void operator()(T t) const { + t.print(); + } + }; + + struct equals_helper { + double tol; + equals_helper(double t) : tol(t) {} + template + bool operator()(T t) const { + return boost::fusion::at_c<0>(t).equals(boost::fusion::at_c<1>(t), tol); + } + }; + + /** two separate function objects for arbitrary copy construction */ + template + struct assign_inner { + typedef Ret result_type; + + Config config; + assign_inner(const Config& cfg) : config(cfg) {} + + template + result_type operator()(const T& t, const result_type& s) const { + result_type new_s(s); + T new_cfg(config); + if (!new_cfg.empty()) boost::fusion::at_key(new_s) = new_cfg; + return new_s; + } + }; + + template + struct assign_outer { + typedef Ret result_type; + + template // T is the config from the "other" config + Ret operator()(const T& t, const Ret& s) const { + assign_inner helper(t); + return boost::fusion::fold(s, s, helper); // loop over the "self" config + } + }; + public: /** create an empty config */ FusionTupleConfig() {} @@ -74,7 +185,7 @@ public: void update(const FusionTupleConfig& config) { base_tuple_ = boost::fusion::accumulate( config.base_tuple_, base_tuple_, - FusionTupleConfig::update_helper()); + update_helper()); } /** @@ -127,13 +238,13 @@ public: /** size of the config - sum all sizes from subconfigs */ size_t size() const { return boost::fusion::accumulate(base_tuple_, 0, - FusionTupleConfig::size_helper()); + size_helper()); } /** combined dimension of the subconfigs */ size_t dim() const { return boost::fusion::accumulate(base_tuple_, 0, - FusionTupleConfig::dim_helper()); + dim_helper()); } /** number of configs in the config */ @@ -155,18 +266,18 @@ public: /** returns true if the config is empty */ bool empty() const { return boost::fusion::all(base_tuple_, - FusionTupleConfig::empty_helper()); + empty_helper()); } /** print */ void print(const std::string& s="") const { std::cout << "FusionTupleConfig " << s << ":" << std::endl; - boost::fusion::for_each(base_tuple_, FusionTupleConfig::print_helper()); + boost::fusion::for_each(base_tuple_, print_helper()); } /** equals */ bool equals(const FusionTupleConfig& other, double tol=1e-9) const { - FusionTupleConfig::equals_helper helper(tol); + equals_helper helper(tol); return boost::fusion::all( boost::fusion::zip(base_tuple_,other.base_tuple_), helper); } @@ -174,17 +285,17 @@ public: /** zero: create VectorConfig of appropriate structure */ VectorConfig zero() const { return boost::fusion::accumulate(base_tuple_, VectorConfig(), - FusionTupleConfig::zero_helper()); + zero_helper()); } FusionTupleConfig expmap(const VectorConfig& delta) const { return boost::fusion::accumulate(base_tuple_, base_tuple_, - FusionTupleConfig::expmap_helper(delta)); + expmap_helper(delta)); } VectorConfig logmap(const FusionTupleConfig& cp) const { return boost::fusion::accumulate(boost::fusion::zip(base_tuple_, cp.base_tuple_), - VectorConfig(), FusionTupleConfig::logmap_helper()); + VectorConfig(), logmap_helper()); } /** @@ -209,117 +320,6 @@ private: ar & BOOST_SERIALIZATION_NVP(base_tuple_); } -private: - - /** helper structs to make use of fusion algorithms */ - struct size_helper { - typedef size_t result_type; - template - size_t operator()(const T& t, const size_t& s) const { - return s + t.size(); - } - }; - - struct dim_helper { - typedef size_t result_type; - template - size_t operator()(const T& t, const size_t& s) const { - return s + t.dim(); - } - }; - - struct zero_helper { - typedef VectorConfig result_type; - template - result_type operator()(const T& t, const result_type& s) const { - result_type new_s(s); - new_s.insert(t.zero()); - return new_s; - } - }; - - struct update_helper { - typedef Configs result_type; - template - result_type operator()(const T& t, const result_type& s) const { - result_type new_s(s); - boost::fusion::at_key(new_s).update(t); - return new_s; - } - }; - - struct expmap_helper { - typedef FusionTupleConfig result_type; - VectorConfig delta; - expmap_helper(const VectorConfig& d) : delta(d) {} - template - result_type operator()(const T& t, const result_type& s) const { - result_type new_s(s); - boost::fusion::at_key(new_s.base_tuple_) = T(gtsam::expmap(t, delta)); - return new_s; - } - }; - - struct logmap_helper { - typedef VectorConfig result_type; - template - result_type operator()(const T& t, const result_type& s) const { - result_type new_s(s); - new_s.insert(gtsam::logmap(boost::fusion::at_c<0>(t), boost::fusion::at_c<1>(t))); - return new_s; - } - }; - - struct empty_helper { - template - bool operator()(T t) const { - return t.empty(); - } - }; - - struct print_helper { - template - void operator()(T t) const { - t.print(); - } - }; - - struct equals_helper { - double tol; - equals_helper(double t) : tol(t) {} - template - bool operator()(T t) const { - return boost::fusion::at_c<0>(t).equals(boost::fusion::at_c<1>(t), tol); - } - }; - - /** two separate function objects for arbitrary copy construction */ - template - struct assign_inner { - typedef Ret result_type; - - Config config; - assign_inner(const Config& cfg) : config(cfg) {} - - template - result_type operator()(const T& t, const result_type& s) const { - result_type new_s(s); - T new_cfg(config); - if (!new_cfg.empty()) boost::fusion::at_key(new_s) = new_cfg; - return new_s; - } - }; - - template - struct assign_outer { - typedef Ret result_type; - - template // T is the config from the "other" config - Ret operator()(const T& t, const Ret& s) const { - assign_inner helper(t); - return boost::fusion::fold(s, s, helper); // loop over the "self" config - } - }; }; /** Exmap static functions */ diff --git a/nonlinear/LieConfig-inl.h b/nonlinear/LieConfig-inl.h index 2398d0762..a7cfa19d7 100644 --- a/nonlinear/LieConfig-inl.h +++ b/nonlinear/LieConfig-inl.h @@ -13,10 +13,10 @@ #include #include -#include "VectorConfig.h" -#include "Lie-inl.h" +#include +#include -#include "LieConfig.h" +#include #define INSTANTIATE_LIE_CONFIG(J,T) \ /*INSTANTIATE_LIE(T);*/ \ diff --git a/nonlinear/LieConfig.h b/nonlinear/LieConfig.h index ef93aae62..3d738c497 100644 --- a/nonlinear/LieConfig.h +++ b/nonlinear/LieConfig.h @@ -20,9 +20,9 @@ #include -#include "Vector.h" -#include "Testable.h" -#include "VectorConfig.h" +#include +#include +#include namespace boost { template class optional; } namespace gtsam { class VectorConfig; } diff --git a/nonlinear/Makefile.am b/nonlinear/Makefile.am index 0cf839716..85005ced9 100644 --- a/nonlinear/Makefile.am +++ b/nonlinear/Makefile.am @@ -3,6 +3,10 @@ # Non-linear optimization #---------------------------------------------------------------------------------------------------- +# 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 + headers = sources = check_PROGRAMS = @@ -38,10 +42,11 @@ endif # The headers are installed in $(includedir)/gtsam: #---------------------------------------------------------------------------------------------------- headers += $(sources:.cpp=.h) -pkginclude_HEADERS = $(headers) +nonlineardir = $(pkgincludedir)/nonlinear +nonlinear_HEADERS = $(headers) noinst_LTLIBRARIES = libnonlinear.la libnonlinear_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/colamd -I$(top_srcdir)/base -I$(top_srcdir)/inference -I$(top_srcdir)/linear +AM_CPPFLAGS = -I$(boost) -I$(BORG_SRCROOT) AM_CXXFLAGS = #---------------------------------------------------------------------------------------------------- diff --git a/nonlinear/NonlinearConstraint.h b/nonlinear/NonlinearConstraint.h index 14cdc47a1..0748c8129 100644 --- a/nonlinear/NonlinearConstraint.h +++ b/nonlinear/NonlinearConstraint.h @@ -9,7 +9,7 @@ #include #include -#include "NonlinearFactor.h" +#include namespace gtsam { diff --git a/nonlinear/NonlinearEquality.h b/nonlinear/NonlinearEquality.h index 2a818a954..950e78cef 100644 --- a/nonlinear/NonlinearEquality.h +++ b/nonlinear/NonlinearEquality.h @@ -9,8 +9,8 @@ #include #include -#include "Key.h" -#include "NonlinearFactor.h" +#include +#include namespace gtsam { diff --git a/nonlinear/NonlinearFactor.h b/nonlinear/NonlinearFactor.h index b6d8d26ee..2d7b20402 100644 --- a/nonlinear/NonlinearFactor.h +++ b/nonlinear/NonlinearFactor.h @@ -15,11 +15,11 @@ #include #include -#include "Factor.h" -#include "Vector.h" -#include "Matrix.h" -#include "SharedGaussian.h" -#include "GaussianFactor.h" +#include +#include +#include +#include +#include #define INSTANTIATE_NONLINEAR_FACTOR1(C,J,X) \ template class gtsam::NonlinearFactor1; diff --git a/nonlinear/NonlinearFactorGraph-inl.h b/nonlinear/NonlinearFactorGraph-inl.h index 34bb3d282..a07143871 100644 --- a/nonlinear/NonlinearFactorGraph-inl.h +++ b/nonlinear/NonlinearFactorGraph-inl.h @@ -9,9 +9,9 @@ #pragma once #include -#include "GaussianFactorGraph.h" -#include "NonlinearFactorGraph.h" -#include "FactorGraph-inl.h" +#include +#include +#include #define INSTANTIATE_NONLINEAR_FACTOR_GRAPH(C) \ INSTANTIATE_FACTOR_GRAPH(NonlinearFactor); \ diff --git a/nonlinear/NonlinearFactorGraph.h b/nonlinear/NonlinearFactorGraph.h index 497d31052..a9d951647 100644 --- a/nonlinear/NonlinearFactorGraph.h +++ b/nonlinear/NonlinearFactorGraph.h @@ -12,8 +12,8 @@ #include -#include "NonlinearFactor.h" -#include "GaussianFactorGraph.h" +#include +#include namespace gtsam { diff --git a/nonlinear/NonlinearOptimizer-inl.h b/nonlinear/NonlinearOptimizer-inl.h index 636184d31..8a66722f5 100644 --- a/nonlinear/NonlinearOptimizer-inl.h +++ b/nonlinear/NonlinearOptimizer-inl.h @@ -11,7 +11,7 @@ #include #include -#include "NonlinearOptimizer.h" +#include #define INSTANTIATE_NONLINEAR_OPTIMIZER(G,C) \ template class NonlinearOptimizer; diff --git a/nonlinear/NonlinearOptimizer.cpp b/nonlinear/NonlinearOptimizer.cpp index 95814f13e..3972ca05d 100644 --- a/nonlinear/NonlinearOptimizer.cpp +++ b/nonlinear/NonlinearOptimizer.cpp @@ -5,7 +5,7 @@ * Created on: Jul 17, 2010 */ -#include "NonlinearOptimizer.h" +#include namespace gtsam { diff --git a/nonlinear/NonlinearOptimizer.h b/nonlinear/NonlinearOptimizer.h index ea6c6dbd5..0f593ddac 100644 --- a/nonlinear/NonlinearOptimizer.h +++ b/nonlinear/NonlinearOptimizer.h @@ -10,9 +10,9 @@ #include #include -#include "VectorConfig.h" -#include "NonlinearFactorGraph.h" -#include "Factorization.h" +#include +#include +#include namespace gtsam { diff --git a/nonlinear/TupleConfig-inl.h b/nonlinear/TupleConfig-inl.h index e629aab11..d48ffa7f1 100644 --- a/nonlinear/TupleConfig-inl.h +++ b/nonlinear/TupleConfig-inl.h @@ -7,8 +7,8 @@ #pragma once -#include "LieConfig-inl.h" -#include "TupleConfig.h" +#include +#include // TupleConfig instantiations for N = 1-6 #define INSTANTIATE_TUPLE_CONFIG1(Config1) \ diff --git a/nonlinear/TupleConfig.h b/nonlinear/TupleConfig.h index b5f2d5eeb..54baa58e4 100644 --- a/nonlinear/TupleConfig.h +++ b/nonlinear/TupleConfig.h @@ -5,8 +5,8 @@ * @author Alex Cunningham */ -#include "LieConfig.h" -#include "VectorConfig.h" +#include +#include #pragma once diff --git a/nonlinear/tests/testConstraintOptimizer.cpp b/nonlinear/tests/testConstraintOptimizer.cpp index c44e12d8c..4cfe70e31 100644 --- a/nonlinear/tests/testConstraintOptimizer.cpp +++ b/nonlinear/tests/testConstraintOptimizer.cpp @@ -12,10 +12,10 @@ #include #include -#include +#include -#include -#include +#include +#include #define GTSAM_MAGIC_KEY diff --git a/nonlinear/tests/testLieConfig.cpp b/nonlinear/tests/testLieConfig.cpp index 0fc824573..262d9339c 100644 --- a/nonlinear/tests/testLieConfig.cpp +++ b/nonlinear/tests/testLieConfig.cpp @@ -5,7 +5,7 @@ * Author: richard */ -#include +#include #include #include #include // for operator += @@ -13,8 +13,8 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY -#include "LieConfig-inl.h" -#include "Vector.h" +#include +#include using namespace gtsam; using namespace std; diff --git a/slam/BearingFactor.h b/slam/BearingFactor.h index b037fbbe2..ec224b95a 100644 --- a/slam/BearingFactor.h +++ b/slam/BearingFactor.h @@ -5,10 +5,10 @@ #pragma once -#include "Rot2.h" -#include "Pose2.h" -#include "Point2.h" -#include "NonlinearFactor.h" +#include +#include +#include +#include namespace gtsam { diff --git a/slam/BearingRangeFactor.h b/slam/BearingRangeFactor.h index d4d0767df..44356e743 100644 --- a/slam/BearingRangeFactor.h +++ b/slam/BearingRangeFactor.h @@ -8,8 +8,8 @@ #pragma once -#include "BearingFactor.h" -#include "RangeFactor.h" +#include +#include namespace gtsam { diff --git a/slam/BetweenConstraint.h b/slam/BetweenConstraint.h index 8f77a1253..e614eda70 100644 --- a/slam/BetweenConstraint.h +++ b/slam/BetweenConstraint.h @@ -6,7 +6,7 @@ #pragma once -#include "NonlinearConstraint.h" +#include namespace gtsam { diff --git a/slam/BetweenFactor.h b/slam/BetweenFactor.h index a8fc40163..e45228720 100644 --- a/slam/BetweenFactor.h +++ b/slam/BetweenFactor.h @@ -6,10 +6,10 @@ #include -#include "NonlinearFactor.h" -#include "GaussianFactor.h" -#include "Lie.h" -#include "Matrix.h" +#include +#include +#include +#include namespace gtsam { diff --git a/slam/BoundingConstraint.h b/slam/BoundingConstraint.h index c438ec510..0fee49d30 100644 --- a/slam/BoundingConstraint.h +++ b/slam/BoundingConstraint.h @@ -6,8 +6,8 @@ #pragma once -#include "Lie.h" -#include "NonlinearConstraint.h" +#include +#include namespace gtsam { diff --git a/slam/GaussianISAM2.cpp b/slam/GaussianISAM2.cpp index b337a68e7..7dbd7ec0f 100644 --- a/slam/GaussianISAM2.cpp +++ b/slam/GaussianISAM2.cpp @@ -4,13 +4,13 @@ * @author Michael Kaess */ -#include "GaussianISAM2.h" +#include using namespace std; using namespace gtsam; // Explicitly instantiate so we don't have to include everywhere -#include "ISAM2-inl.h" +#include template class ISAM2; template class ISAM2; diff --git a/slam/GaussianISAM2.h b/slam/GaussianISAM2.h index 61c2de016..3acf840a8 100644 --- a/slam/GaussianISAM2.h +++ b/slam/GaussianISAM2.h @@ -8,11 +8,11 @@ #pragma once -#include "ISAM2.h" -#include "GaussianConditional.h" -#include "GaussianFactor.h" -#include "simulated2D.h" -#include "planarSLAM.h" +#include +#include +#include +#include +#include namespace gtsam { diff --git a/slam/LinearApproxFactor.h b/slam/LinearApproxFactor.h index 2d2416824..021cc34ea 100644 --- a/slam/LinearApproxFactor.h +++ b/slam/LinearApproxFactor.h @@ -9,9 +9,9 @@ #include #include #include -#include "NonlinearFactor.h" -#include "VectorConfig.h" -#include "Matrix.h" +#include +#include +#include namespace gtsam { diff --git a/slam/Makefile.am b/slam/Makefile.am index 1994fcccd..5935893fb 100644 --- a/slam/Makefile.am +++ b/slam/Makefile.am @@ -2,6 +2,10 @@ # SLAM and SFM sources #---------------------------------------------------------------------------------------------------- +# 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 + headers = sources = check_PROGRAMS = @@ -60,11 +64,11 @@ check_PROGRAMS += tests/testGaussianISAM2 # The headers are installed in $(includedir)/gtsam: #---------------------------------------------------------------------------------------------------- headers += $(sources:.cpp=.h) -pkginclude_HEADERS = $(headers) +slamdir = $(pkgincludedir)/slam +slam_HEADERS = $(headers) noinst_LTLIBRARIES = libslam.la libslam_la_SOURCES = $(sources) -AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -I$(top_srcdir)/colamd -I$(top_srcdir)/base -I$(top_srcdir)/inference -AM_CPPFLAGS += -I$(top_srcdir)/linear -I$(top_srcdir)/nonlinear -I$(top_srcdir)/geometry +AM_CPPFLAGS = -I$(boost) -I$(BORG_SRCROOT) #---------------------------------------------------------------------------------------------------- # rules to build local programs diff --git a/slam/Pose2SLAMOptimizer.cpp b/slam/Pose2SLAMOptimizer.cpp index 43ff60277..2a6672025 100644 --- a/slam/Pose2SLAMOptimizer.cpp +++ b/slam/Pose2SLAMOptimizer.cpp @@ -5,10 +5,10 @@ * Author: dellaert */ -#include "Pose2SLAMOptimizer.h" -#include "pose2SLAM.h" -#include "dataset.h" -#include "SubgraphSolver-inl.h" +#include +#include +#include +#include using namespace std; namespace gtsam { diff --git a/slam/Pose2SLAMOptimizer.h b/slam/Pose2SLAMOptimizer.h index af1d2dc1f..b2f733085 100644 --- a/slam/Pose2SLAMOptimizer.h +++ b/slam/Pose2SLAMOptimizer.h @@ -10,9 +10,9 @@ #include -#include "pose2SLAM.h" -#include "Ordering.h" -#include "SubgraphSolver.h" +#include +#include +#include namespace gtsam { diff --git a/slam/PriorFactor.h b/slam/PriorFactor.h index db8bf0210..a05349240 100644 --- a/slam/PriorFactor.h +++ b/slam/PriorFactor.h @@ -5,9 +5,9 @@ #pragma once #include -#include "NoiseModel.h" -#include "NonlinearFactor.h" -#include "Pose2.h" +#include +#include +#include namespace gtsam { diff --git a/slam/RangeFactor.h b/slam/RangeFactor.h index 46d7f65bf..2c97ded3f 100644 --- a/slam/RangeFactor.h +++ b/slam/RangeFactor.h @@ -5,9 +5,9 @@ #pragma once -#include "Pose2.h" -#include "Point2.h" -#include "NonlinearFactor.h" +#include +#include +#include namespace gtsam { diff --git a/slam/Simulated2DConfig.h b/slam/Simulated2DConfig.h index 997577aed..e9e9d0612 100644 --- a/slam/Simulated2DConfig.h +++ b/slam/Simulated2DConfig.h @@ -7,7 +7,7 @@ #pragma once -#include "simulated2D.h" +#include namespace gtsam { diff --git a/slam/Simulated2DMeasurement.h b/slam/Simulated2DMeasurement.h index 61840b15d..65b2b8d2a 100644 --- a/slam/Simulated2DMeasurement.h +++ b/slam/Simulated2DMeasurement.h @@ -7,8 +7,8 @@ #pragma once -#include "simulated2D.h" -#include "Simulated2DConfig.h" +#include +#include namespace gtsam { diff --git a/slam/Simulated2DOdometry.h b/slam/Simulated2DOdometry.h index 93aca0ce6..59df8ce55 100644 --- a/slam/Simulated2DOdometry.h +++ b/slam/Simulated2DOdometry.h @@ -7,8 +7,8 @@ #pragma once -#include "simulated2D.h" -#include "Simulated2DConfig.h" +#include +#include namespace gtsam { diff --git a/slam/Simulated2DOrientedConfig.h b/slam/Simulated2DOrientedConfig.h index 41a3606e5..7ea9268b0 100644 --- a/slam/Simulated2DOrientedConfig.h +++ b/slam/Simulated2DOrientedConfig.h @@ -7,7 +7,7 @@ #pragma once -#include "simulated2DOriented.h" +#include namespace gtsam { diff --git a/slam/Simulated2DOrientedOdometry.h b/slam/Simulated2DOrientedOdometry.h index d1cb7d66c..bc6d73ef7 100644 --- a/slam/Simulated2DOrientedOdometry.h +++ b/slam/Simulated2DOrientedOdometry.h @@ -7,8 +7,8 @@ #pragma once -#include "simulated2DOriented.h" -#include "Simulated2DOrientedConfig.h" +#include +#include namespace gtsam { diff --git a/slam/Simulated2DOrientedPosePrior.h b/slam/Simulated2DOrientedPosePrior.h index ff25741a7..ad893bdcc 100644 --- a/slam/Simulated2DOrientedPosePrior.h +++ b/slam/Simulated2DOrientedPosePrior.h @@ -7,8 +7,8 @@ #pragma once -#include "simulated2DOriented.h" -#include "Simulated2DOrientedConfig.h" +#include +#include namespace gtsam { diff --git a/slam/Simulated2DPointPrior.h b/slam/Simulated2DPointPrior.h index e563978db..82b36cbf5 100644 --- a/slam/Simulated2DPointPrior.h +++ b/slam/Simulated2DPointPrior.h @@ -7,8 +7,8 @@ #pragma once -#include "simulated2D.h" -#include "Simulated2DConfig.h" +#include +#include namespace gtsam { diff --git a/slam/Simulated2DPosePrior.h b/slam/Simulated2DPosePrior.h index 47da3d500..ae01f524a 100644 --- a/slam/Simulated2DPosePrior.h +++ b/slam/Simulated2DPosePrior.h @@ -7,8 +7,8 @@ #pragma once -#include "simulated2D.h" -#include "Simulated2DConfig.h" +#include +#include namespace gtsam { diff --git a/slam/Simulated3D.cpp b/slam/Simulated3D.cpp index 09d0c5e80..3123a0435 100644 --- a/slam/Simulated3D.cpp +++ b/slam/Simulated3D.cpp @@ -4,7 +4,7 @@ * @author Alex Cunningham **/ -#include "Simulated3D.h" +#include namespace gtsam { namespace simulated3D { diff --git a/slam/Simulated3D.h b/slam/Simulated3D.h index b5673d96b..552e76322 100644 --- a/slam/Simulated3D.h +++ b/slam/Simulated3D.h @@ -8,10 +8,10 @@ #pragma once -#include "Matrix.h" -#include "VectorConfig.h" -#include "NonlinearFactor.h" -#include "Key.h" +#include +#include +#include +#include // \namespace diff --git a/slam/TransformConstraint.h b/slam/TransformConstraint.h index 6dde14166..24636c077 100644 --- a/slam/TransformConstraint.h +++ b/slam/TransformConstraint.h @@ -6,7 +6,7 @@ #pragma once -#include "NonlinearConstraint.h" +#include namespace gtsam { diff --git a/slam/dataset.cpp b/slam/dataset.cpp index 6041abe2f..763410cbd 100644 --- a/slam/dataset.cpp +++ b/slam/dataset.cpp @@ -10,9 +10,9 @@ #include #include #include -#include "graph-inl.h" +#include -#include "dataset.h" +#include using namespace std; using namespace gtsam; diff --git a/slam/dataset.h b/slam/dataset.h index 278a155b4..862b36db4 100644 --- a/slam/dataset.h +++ b/slam/dataset.h @@ -11,8 +11,8 @@ #include #include -#include "pose2SLAM.h" -#include "graph.h" +#include +#include namespace gtsam { diff --git a/slam/planarSLAM.cpp b/slam/planarSLAM.cpp index 417bbf8a4..6e74e78a7 100644 --- a/slam/planarSLAM.cpp +++ b/slam/planarSLAM.cpp @@ -4,10 +4,10 @@ * @authors Frank Dellaert **/ -#include "planarSLAM.h" -#include "NonlinearFactorGraph-inl.h" -#include "NonlinearOptimizer-inl.h" -#include "TupleConfig-inl.h" +#include +#include +#include +#include // Use planarSLAM namespace for specific SLAM instance namespace gtsam { diff --git a/slam/planarSLAM.h b/slam/planarSLAM.h index 3b0840717..0fcf34ab6 100644 --- a/slam/planarSLAM.h +++ b/slam/planarSLAM.h @@ -6,13 +6,13 @@ #pragma once -#include "BearingRangeFactor.h" -#include "TupleConfig.h" -#include "NonlinearEquality.h" -#include "PriorFactor.h" -#include "BetweenFactor.h" -#include "NonlinearFactorGraph.h" -#include "NonlinearOptimizer.h" +#include +#include +#include +#include +#include +#include +#include // We use gtsam namespace for generally useful factors namespace gtsam { diff --git a/slam/pose2SLAM.cpp b/slam/pose2SLAM.cpp index 852ff2205..312556dbe 100644 --- a/slam/pose2SLAM.cpp +++ b/slam/pose2SLAM.cpp @@ -4,10 +4,10 @@ * @authors Frank Dellaert **/ -#include "pose2SLAM.h" -#include "LieConfig-inl.h" -#include "NonlinearFactorGraph-inl.h" -#include "NonlinearOptimizer-inl.h" +#include +#include +#include +#include // Use pose2SLAM namespace for specific SLAM instance namespace gtsam { diff --git a/slam/pose2SLAM.h b/slam/pose2SLAM.h index 8c237ab76..98a6e2324 100644 --- a/slam/pose2SLAM.h +++ b/slam/pose2SLAM.h @@ -6,14 +6,14 @@ #pragma once -#include "Key.h" -#include "Pose2.h" -#include "LieConfig.h" -#include "PriorFactor.h" -#include "BetweenFactor.h" -#include "NonlinearEquality.h" -#include "NonlinearFactorGraph.h" -#include "NonlinearOptimizer.h" +#include +#include +#include +#include +#include +#include +#include +#include namespace gtsam { diff --git a/slam/pose3SLAM.cpp b/slam/pose3SLAM.cpp index c58bf65ce..46a95eed6 100644 --- a/slam/pose3SLAM.cpp +++ b/slam/pose3SLAM.cpp @@ -4,10 +4,10 @@ * @authors Frank Dellaert **/ -#include "pose3SLAM.h" -#include "LieConfig-inl.h" -#include "NonlinearFactorGraph-inl.h" -#include "NonlinearOptimizer-inl.h" +#include +#include +#include +#include // Use pose3SLAM namespace for specific SLAM instance namespace gtsam { diff --git a/slam/pose3SLAM.h b/slam/pose3SLAM.h index 28b6f0a56..c2660dac7 100644 --- a/slam/pose3SLAM.h +++ b/slam/pose3SLAM.h @@ -6,14 +6,14 @@ #pragma once -#include "Key.h" -#include "Pose3.h" -#include "LieConfig.h" -#include "PriorFactor.h" -#include "BetweenFactor.h" -#include "NonlinearEquality.h" -#include "NonlinearFactorGraph.h" -#include "NonlinearOptimizer.h" +#include +#include +#include +#include +#include +#include +#include +#include namespace gtsam { diff --git a/slam/saveGraph.cpp b/slam/saveGraph.cpp index 858ea56ed..9991946f2 100644 --- a/slam/saveGraph.cpp +++ b/slam/saveGraph.cpp @@ -7,12 +7,12 @@ #include #include #include -#include "Ordering.h" -#include "Point2.h" -#include "SymbolicFactorGraph.h" -#include "SymbolicBayesNet.h" -#include "inference-inl.h" -#include "LieConfig-inl.h" +#include +#include +#include +#include +#include +#include using namespace std; diff --git a/slam/saveGraph.h b/slam/saveGraph.h index ebed48a27..e488eac7e 100644 --- a/slam/saveGraph.h +++ b/slam/saveGraph.h @@ -7,12 +7,12 @@ #include #include -#include "FactorGraph.h" -#include "SymbolicFactor.h" -#include "SymbolicBayesNet.h" -#include "Key.h" -#include "Point2.h" -#include "LieConfig.h" +#include +#include +#include +#include +#include +#include namespace gtsam { diff --git a/slam/simulated2D.cpp b/slam/simulated2D.cpp index e5d48f6d7..03bdc4857 100644 --- a/slam/simulated2D.cpp +++ b/slam/simulated2D.cpp @@ -4,9 +4,9 @@ * @author Frank Dellaert */ -#include "simulated2D.h" -#include "LieConfig-inl.h" -#include "TupleConfig-inl.h" +#include +#include +#include namespace gtsam { diff --git a/slam/simulated2D.h b/slam/simulated2D.h index b2bef5299..93eab3564 100644 --- a/slam/simulated2D.h +++ b/slam/simulated2D.h @@ -8,9 +8,9 @@ #pragma once -#include "Point2.h" -#include "TupleConfig.h" -#include "NonlinearFactor.h" +#include +#include +#include // \namespace diff --git a/slam/simulated2DConstraints.h b/slam/simulated2DConstraints.h index 4e7d9ca76..689a812f0 100644 --- a/slam/simulated2DConstraints.h +++ b/slam/simulated2DConstraints.h @@ -8,12 +8,12 @@ #pragma once -#include // TODO: remove +#include -#include "NonlinearConstraint.h" -#include "BetweenConstraint.h" -#include "BoundingConstraint.h" -#include "simulated2D.h" +#include +#include +#include +#include // \namespace diff --git a/slam/simulated2DOriented.cpp b/slam/simulated2DOriented.cpp index 519ff93d3..e4c0e4d54 100644 --- a/slam/simulated2DOriented.cpp +++ b/slam/simulated2DOriented.cpp @@ -4,8 +4,8 @@ * @author Frank Dellaert */ -#include "simulated2DOriented.h" -#include "TupleConfig-inl.h" +#include +#include namespace gtsam { diff --git a/slam/simulated2DOriented.h b/slam/simulated2DOriented.h index 9bb034d53..db378f465 100644 --- a/slam/simulated2DOriented.h +++ b/slam/simulated2DOriented.h @@ -8,9 +8,9 @@ #pragma once -#include "Pose2.h" -#include "TupleConfig.h" -#include "NonlinearFactor.h" +#include +#include +#include // \namespace diff --git a/slam/smallExample.cpp b/slam/smallExample.cpp index 5cbb5b3ae..d2941f0c6 100644 --- a/slam/smallExample.cpp +++ b/slam/smallExample.cpp @@ -14,15 +14,15 @@ using namespace std; #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "Matrix.h" -#include "NonlinearFactor.h" -#include "smallExample.h" +#include +#include +#include +#include // template definitions -#include "FactorGraph-inl.h" -#include "TupleConfig-inl.h" -#include "NonlinearFactorGraph-inl.h" +#include +#include +#include namespace gtsam { namespace example { diff --git a/slam/smallExample.h b/slam/smallExample.h index 310ed30c3..1719c84f0 100644 --- a/slam/smallExample.h +++ b/slam/smallExample.h @@ -11,8 +11,8 @@ #pragma once #include -#include "NonlinearFactorGraph.h" -#include "simulated2D.h" +#include +#include namespace gtsam { namespace example { diff --git a/slam/tests/testGaussianISAM2.cpp b/slam/tests/testGaussianISAM2.cpp index 4c6cc316b..b1d7c9426 100644 --- a/slam/tests/testGaussianISAM2.cpp +++ b/slam/tests/testGaussianISAM2.cpp @@ -8,14 +8,14 @@ #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "GaussianBayesNet.h" -#include "GaussianISAM2.h" -#include "smallExample.h" +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testPlanarSLAM.cpp b/slam/tests/testPlanarSLAM.cpp index cd325c955..1f4a2b8d9 100644 --- a/slam/tests/testPlanarSLAM.cpp +++ b/slam/tests/testPlanarSLAM.cpp @@ -4,10 +4,10 @@ **/ #include -#include +#include -#include "planarSLAM.h" -#include "BearingRangeFactor.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testPose2Config.cpp b/slam/tests/testPose2Config.cpp index 0be4145e6..25bc2ef38 100644 --- a/slam/tests/testPose2Config.cpp +++ b/slam/tests/testPose2Config.cpp @@ -5,8 +5,8 @@ #include -#include -#include "pose2SLAM.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testPose2Factor.cpp b/slam/tests/testPose2Factor.cpp index 86d36f183..dd0429b8b 100644 --- a/slam/tests/testPose2Factor.cpp +++ b/slam/tests/testPose2Factor.cpp @@ -4,12 +4,12 @@ * @authors Frank Dellaert, Viorela Ila **/ -#include +#include #define GTSAM_MAGIC_KEY -#include "numericalDerivative.h" -#include "pose2SLAM.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testPose2Prior.cpp b/slam/tests/testPose2Prior.cpp index cd3801851..8309a5f9c 100644 --- a/slam/tests/testPose2Prior.cpp +++ b/slam/tests/testPose2Prior.cpp @@ -4,12 +4,12 @@ * @authors Frank Dellaert, Viorela Ila **/ -#include +#include #define GTSAM_MAGIC_KEY -#include "numericalDerivative.h" -#include "pose2SLAM.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testPose2SLAM.cpp b/slam/tests/testPose2SLAM.cpp index 9ccbbae6d..460d9c65c 100644 --- a/slam/tests/testPose2SLAM.cpp +++ b/slam/tests/testPose2SLAM.cpp @@ -9,15 +9,15 @@ using namespace boost; using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "NonlinearOptimizer-inl.h" -#include "FactorGraph-inl.h" -#include "Ordering.h" -#include "pose2SLAM.h" -#include "Pose2SLAMOptimizer.h" +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testPose3Config.cpp b/slam/tests/testPose3Config.cpp index 07b5e7eee..43a509d29 100644 --- a/slam/tests/testPose3Config.cpp +++ b/slam/tests/testPose3Config.cpp @@ -5,8 +5,8 @@ #include -#include -#include "pose3SLAM.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testPose3Factor.cpp b/slam/tests/testPose3Factor.cpp index 8af57517d..0acf5d9d6 100644 --- a/slam/tests/testPose3Factor.cpp +++ b/slam/tests/testPose3Factor.cpp @@ -8,8 +8,8 @@ #include using namespace boost::assign; -#include -#include "pose3SLAM.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testPose3SLAM.cpp b/slam/tests/testPose3SLAM.cpp index faa8c280a..e4c388b5a 100644 --- a/slam/tests/testPose3SLAM.cpp +++ b/slam/tests/testPose3SLAM.cpp @@ -11,14 +11,14 @@ using namespace boost; using namespace boost::assign; -#include +#include // TODO: DANGEROUS, create shared pointers #define GTSAM_MAGIC_GAUSSIAN 6 #define GTSAM_MAGIC_KEY -#include "pose3SLAM.h" -#include "Ordering.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testSimulated2D.cpp b/slam/tests/testSimulated2D.cpp index 4f7b00e45..d9b7d7817 100644 --- a/slam/tests/testSimulated2D.cpp +++ b/slam/tests/testSimulated2D.cpp @@ -6,11 +6,11 @@ **/ #include -#include +#include -#include "numericalDerivative.h" -#include "simulated2D.h" -#include "Simulated2DConfig.h" +#include +#include +#include using namespace gtsam; using namespace std; diff --git a/slam/tests/testSimulated2DOriented.cpp b/slam/tests/testSimulated2DOriented.cpp index 23cb32452..9f64d33e2 100644 --- a/slam/tests/testSimulated2DOriented.cpp +++ b/slam/tests/testSimulated2DOriented.cpp @@ -7,12 +7,12 @@ */ #include -#include +#include -#include "numericalDerivative.h" -#include "Simulated2DConfig.h" -#include "simulated2DOriented.h" -#include "Simulated2DOrientedOdometry.h" +#include +#include +#include +#include using namespace gtsam; using namespace std; diff --git a/slam/tests/testSimulated3D.cpp b/slam/tests/testSimulated3D.cpp index b4e2b5e1c..905b71b0b 100644 --- a/slam/tests/testSimulated3D.cpp +++ b/slam/tests/testSimulated3D.cpp @@ -5,11 +5,11 @@ **/ #include -#include +#include -#include "Pose3.h" -#include "numericalDerivative.h" -#include "Simulated3D.h" +#include +#include +#include using namespace gtsam; using namespace simulated3D; diff --git a/slam/tests/testVSLAMConfig.cpp b/slam/tests/testVSLAMConfig.cpp index c08edc647..087bce41e 100644 --- a/slam/tests/testVSLAMConfig.cpp +++ b/slam/tests/testVSLAMConfig.cpp @@ -4,12 +4,12 @@ * @author Alex Cunningham */ -#include +#include #define GTSAM_MAGIC_KEY -#include "VectorConfig.h" -#include "visualSLAM.h" +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testVSLAMFactor.cpp b/slam/tests/testVSLAMFactor.cpp index 1bc3c162b..86fc4318c 100644 --- a/slam/tests/testVSLAMFactor.cpp +++ b/slam/tests/testVSLAMFactor.cpp @@ -2,13 +2,13 @@ Written by Frank Dellaert, Nov 2009 **********************************************************/ -#include +#include #define GTSAM_MAGIC_KEY -#include "visualSLAM.h" -#include "Point3.h" -#include "Pose3.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/tests/testVSLAMGraph.cpp b/slam/tests/testVSLAMGraph.cpp index f2c634146..4d712de5c 100644 --- a/slam/tests/testVSLAMGraph.cpp +++ b/slam/tests/testVSLAMGraph.cpp @@ -7,16 +7,16 @@ * @author Viorela Ila */ -#include +#include #include using namespace boost; #define GTSAM_MAGIC_KEY -#include "NonlinearFactorGraph-inl.h" -#include "NonlinearOptimizer-inl.h" -#include "graph-inl.h" -#include "visualSLAM.h" +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/slam/visualSLAM.cpp b/slam/visualSLAM.cpp index 26fa92c04..70cdb5376 100644 --- a/slam/visualSLAM.cpp +++ b/slam/visualSLAM.cpp @@ -5,10 +5,10 @@ * Author: richard */ -#include "visualSLAM.h" -#include "TupleConfig-inl.h" -#include "NonlinearOptimizer-inl.h" -#include "NonlinearFactorGraph-inl.h" +#include +#include +#include +#include namespace gtsam { INSTANTIATE_TUPLE_CONFIG2(visualSLAM::PoseConfig, visualSLAM::PointConfig) diff --git a/slam/visualSLAM.h b/slam/visualSLAM.h index a9da996f0..7820e9070 100644 --- a/slam/visualSLAM.h +++ b/slam/visualSLAM.h @@ -7,15 +7,15 @@ #pragma once -#include "Key.h" -#include "Pose3.h" -#include "Point3.h" -#include "NonlinearFactorGraph.h" -#include "Cal3_S2.h" -#include "Point2.h" -#include "SimpleCamera.h" -#include "TupleConfig.h" -#include "NonlinearEquality.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace gtsam { namespace visualSLAM { diff --git a/tests/Makefile.am b/tests/Makefile.am index 0a03c3382..401a247a8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,6 +3,10 @@ # More elaborate unit tests that test functionality with slam examples #---------------------------------------------------------------------------------------------------- +# 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 + check_PROGRAMS = testBayesNetPreconditioner check_PROGRAMS += testGaussianBayesNet testGaussianFactor testGaussianFactorGraph check_PROGRAMS += testGaussianISAM testGraph @@ -14,7 +18,7 @@ check_PROGRAMS += testNonlinearEqualityConstraint testBoundingConstraint check_PROGRAMS += testTransformConstraint testLinearApproxFactor # experimental -check_PROGRAMS += testFusionTupleConfig +#check_PROGRAMS += testFusionTupleConfig if USE_LDL check_PROGRAMS += testConstraintOptimizer @@ -27,8 +31,7 @@ noinst_PROGRAMS = timeGaussianFactorGraph # rules to build unit tests #---------------------------------------------------------------------------------------------------- TESTS = $(check_PROGRAMS) -AM_CPPFLAGS = -I$(boost) -I$(top_srcdir)/colamd -I$(top_srcdir)/base -I$(top_srcdir)/geometry -AM_CPPFLAGS += -I$(top_srcdir) -I$(top_srcdir)/inference -I$(top_srcdir)/linear -I$(top_srcdir)/nonlinear -I$(top_srcdir)/slam +AM_CPPFLAGS = -I$(boost) -I$(BORG_SRCROOT) AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) LDADD = ../libgtsam.la ../CppUnitLite/libCppUnitLite.a AM_DEFAULT_SOURCE_EXT = .cpp diff --git a/tests/testBayesNetPreconditioner.cpp b/tests/testBayesNetPreconditioner.cpp index 0e443bb08..372abf05e 100644 --- a/tests/testBayesNetPreconditioner.cpp +++ b/tests/testBayesNetPreconditioner.cpp @@ -6,18 +6,18 @@ #include #include -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "BayesNetPreconditioner.h" -#include "iterative-inl.h" +#include +#include +#include using namespace std; using namespace gtsam; -#include "smallExample.h" +#include using namespace example; /* ************************************************************************* */ diff --git a/tests/testBoundingConstraint.cpp b/tests/testBoundingConstraint.cpp index 158004786..943d4652b 100644 --- a/tests/testBoundingConstraint.cpp +++ b/tests/testBoundingConstraint.cpp @@ -4,11 +4,11 @@ * @author Alex Cunningham */ -#include +#include -#include -#include -#include +#include +#include +#include namespace iq2D = gtsam::simulated2D::inequality_constraints; using namespace std; diff --git a/tests/testConstraintOptimizer.cpp b/tests/testConstraintOptimizer.cpp index caa8a2116..fa85ef8b9 100644 --- a/tests/testConstraintOptimizer.cpp +++ b/tests/testConstraintOptimizer.cpp @@ -10,10 +10,10 @@ #include #include -#include +#include -#include -#include +#include +#include #define GTSAM_MAGIC_KEY @@ -23,7 +23,7 @@ using namespace boost::assign; using namespace std; using namespace gtsam; -#include +#include using namespace example; /* ************************************************************************* */ diff --git a/tests/testFusionTupleConfig.cpp b/tests/testFusionTupleConfig.cpp index 91d6d48b0..b16994b81 100644 --- a/tests/testFusionTupleConfig.cpp +++ b/tests/testFusionTupleConfig.cpp @@ -5,23 +5,23 @@ #include -#include +#include #define GTSAM_MAGIC_KEY -#include -#include -#include -#include +#include +#include +#include +#include -#include "BearingRangeFactor.h" -#include "PriorFactor.h" -#include "BetweenFactor.h" +#include +#include +#include -#include -#include -#include -#include +#include +#include +#include +#include using namespace boost; using namespace gtsam; diff --git a/tests/testGaussianBayesNet.cpp b/tests/testGaussianBayesNet.cpp index 6bc33c125..c7b025359 100644 --- a/tests/testGaussianBayesNet.cpp +++ b/tests/testGaussianBayesNet.cpp @@ -7,7 +7,7 @@ // STL/C++ #include #include -#include +#include #include #include @@ -21,10 +21,10 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY -#include "GaussianBayesNet.h" -#include "BayesNet.h" -#include "smallExample.h" -#include "Ordering.h" +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testGaussianFactor.cpp b/tests/testGaussianFactor.cpp index 7892c8ff0..28cbadffe 100644 --- a/tests/testGaussianFactor.cpp +++ b/tests/testGaussianFactor.cpp @@ -13,15 +13,15 @@ #include // for insert using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Matrix.h" -#include "Ordering.h" -#include "GaussianConditional.h" -#include "inference-inl.h" -#include "smallExample.h" +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testGaussianFactorGraph.cpp b/tests/testGaussianFactorGraph.cpp index 68446f1cd..88d4dcc0c 100644 --- a/tests/testGaussianFactorGraph.cpp +++ b/tests/testGaussianFactorGraph.cpp @@ -15,18 +15,18 @@ using namespace std; #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Matrix.h" -#include "Ordering.h" -#include "smallExample.h" -#include "GaussianBayesNet.h" -#include "numericalDerivative.h" -#include "SymbolicFactorGraph.h" -#include "BayesTree-inl.h" -#include "inference-inl.h" // needed for eliminate and marginals +#include +#include +#include +#include +#include +#include +#include +#include using namespace gtsam; diff --git a/tests/testGaussianISAM.cpp b/tests/testGaussianISAM.cpp index 94326adc8..0b95bf21b 100644 --- a/tests/testGaussianISAM.cpp +++ b/tests/testGaussianISAM.cpp @@ -8,15 +8,15 @@ #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "GaussianBayesNet.h" -#include "ISAM-inl.h" -#include "GaussianISAM.h" -#include "smallExample.h" +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testGaussianJunctionTree.cpp b/tests/testGaussianJunctionTree.cpp index 53f381c25..1c3de1686 100644 --- a/tests/testGaussianJunctionTree.cpp +++ b/tests/testGaussianJunctionTree.cpp @@ -7,7 +7,7 @@ */ #include -#include +#include #include #include // for operator += @@ -16,9 +16,9 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "GaussianJunctionTree.h" -#include "smallExample.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testGraph.cpp b/tests/testGraph.cpp index 168f2433c..8260cc7ad 100644 --- a/tests/testGraph.cpp +++ b/tests/testGraph.cpp @@ -11,15 +11,15 @@ #include // for operator += using namespace boost::assign; -#include +#include // TODO: DANGEROUS, create shared pointers #define GTSAM_MAGIC_GAUSSIAN 3 -#include "pose2SLAM.h" -#include "TupleConfig-inl.h" -#include "graph-inl.h" -#include "FactorGraph-inl.h" +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testInference.cpp b/tests/testInference.cpp index f00d21ff7..5de5cdba7 100644 --- a/tests/testInference.cpp +++ b/tests/testInference.cpp @@ -4,13 +4,13 @@ * @author Frank Dellaert */ -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "smallExample.h" -#include "inference-inl.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testIterative.cpp b/tests/testIterative.cpp index 543295b6f..4015c684d 100644 --- a/tests/testIterative.cpp +++ b/tests/testIterative.cpp @@ -7,20 +7,20 @@ #include // for operator += using namespace boost::assign; -#include +#include // TODO: DANGEROUS, create shared pointers #define GTSAM_MAGIC_GAUSSIAN 3 #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "VectorConfig.h" -#include "smallExample.h" -#include "pose2SLAM.h" -#include "SubgraphPreconditioner.h" -#include "FactorGraph-inl.h" -#include "NonlinearFactorGraph-inl.h" -#include "iterative-inl.h" +#include +#include +#include +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testLinearApproxFactor.cpp b/tests/testLinearApproxFactor.cpp index a322dd0e6..8e9456cfc 100644 --- a/tests/testLinearApproxFactor.cpp +++ b/tests/testLinearApproxFactor.cpp @@ -5,11 +5,11 @@ */ #include -#include -#include // allow assert_equal() for vectors -#include -#include -#include +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testNonlinearEquality.cpp b/tests/testNonlinearEquality.cpp index 08fce39ef..f39bde016 100644 --- a/tests/testNonlinearEquality.cpp +++ b/tests/testNonlinearEquality.cpp @@ -3,20 +3,20 @@ * @author Alex Cunningham */ -#include +#include #define GTSAM_MAGIC_KEY -#include "Key.h" -#include "Pose2.h" -#include "Ordering.h" -#include "VectorConfig.h" -#include "NonlinearEquality.h" -#include "PriorFactor.h" -#include "NonlinearFactorGraph.h" -#include "NonlinearOptimizer-inl.h" +#include +#include +#include +#include +#include +#include +#include +#include -#include "LieConfig-inl.h" +#include using namespace std; using namespace gtsam; diff --git a/tests/testNonlinearEqualityConstraint.cpp b/tests/testNonlinearEqualityConstraint.cpp index 3a1fe96a6..e59fa976f 100644 --- a/tests/testNonlinearEqualityConstraint.cpp +++ b/tests/testNonlinearEqualityConstraint.cpp @@ -3,12 +3,12 @@ * @author Alex Cunningham */ -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include namespace eq2D = gtsam::simulated2D::equality_constraints; diff --git a/tests/testNonlinearFactor.cpp b/tests/testNonlinearFactor.cpp index a4c6b5174..38a4fb63c 100644 --- a/tests/testNonlinearFactor.cpp +++ b/tests/testNonlinearFactor.cpp @@ -9,16 +9,16 @@ /*STL/C++*/ #include -#include +#include // TODO: DANGEROUS, create shared pointers #define GTSAM_MAGIC_GAUSSIAN 2 #define GTSAM_MAGIC_KEY -#include "Matrix.h" -#include "smallExample.h" -#include "simulated2D.h" -#include "GaussianFactor.h" +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testNonlinearFactorGraph.cpp b/tests/testNonlinearFactorGraph.cpp index c2816a2bd..000a4084b 100644 --- a/tests/testNonlinearFactorGraph.cpp +++ b/tests/testNonlinearFactorGraph.cpp @@ -13,14 +13,14 @@ using namespace std; #include using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Matrix.h" -#include "smallExample.h" -#include "FactorGraph-inl.h" -#include "NonlinearFactorGraph-inl.h" +#include +#include +#include +#include using namespace gtsam; using namespace example; diff --git a/tests/testNonlinearOptimizer.cpp b/tests/testNonlinearOptimizer.cpp index 093e9aed4..594861b2a 100644 --- a/tests/testNonlinearOptimizer.cpp +++ b/tests/testNonlinearOptimizer.cpp @@ -10,24 +10,24 @@ using namespace std; #include // for operator += using namespace boost::assign; -#include +#include #include using namespace boost; #define GTSAM_MAGIC_KEY -#include "Matrix.h" -#include "Ordering.h" -#include "smallExample.h" -#include "pose2SLAM.h" -#include "GaussianFactorGraph.h" -#include "NoiseModel.h" +#include +#include +#include +#include +#include +#include // template definitions -#include "NonlinearFactorGraph-inl.h" -#include "NonlinearOptimizer-inl.h" -#include "SubgraphSolver-inl.h" +#include +#include +#include using namespace gtsam; diff --git a/tests/testSubgraphPreconditioner.cpp b/tests/testSubgraphPreconditioner.cpp index 8203306a0..774600eeb 100644 --- a/tests/testSubgraphPreconditioner.cpp +++ b/tests/testSubgraphPreconditioner.cpp @@ -9,15 +9,15 @@ #include using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "numericalDerivative.h" -#include "Ordering.h" -#include "smallExample.h" -#include "SubgraphPreconditioner.h" -#include "iterative-inl.h" +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testSymbolicBayesNet.cpp b/tests/testSymbolicBayesNet.cpp index f99f3adfe..b88d9d9a6 100644 --- a/tests/testSymbolicBayesNet.cpp +++ b/tests/testSymbolicBayesNet.cpp @@ -8,14 +8,14 @@ #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "smallExample.h" -#include "SymbolicBayesNet.h" -#include "SymbolicFactorGraph.h" +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testSymbolicFactorGraph.cpp b/tests/testSymbolicFactorGraph.cpp index 1222c7261..fd5b7585c 100644 --- a/tests/testSymbolicFactorGraph.cpp +++ b/tests/testSymbolicFactorGraph.cpp @@ -7,15 +7,15 @@ #include // for operator += using namespace boost::assign; -#include +#include #define GTSAM_MAGIC_KEY -#include "Ordering.h" -#include "smallExample.h" -#include "SymbolicFactorGraph.h" -#include "SymbolicBayesNet.h" -#include "FactorGraph-inl.h" +#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testTransformConstraint.cpp b/tests/testTransformConstraint.cpp index 0cd1d7500..bc8fdf14d 100644 --- a/tests/testTransformConstraint.cpp +++ b/tests/testTransformConstraint.cpp @@ -7,23 +7,23 @@ #include -#include +#include -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include -#include -#include +#include +#include // implementations -#include -#include -#include -#include +#include +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testTupleConfig.cpp b/tests/testTupleConfig.cpp index eb77a6599..78394ec63 100644 --- a/tests/testTupleConfig.cpp +++ b/tests/testTupleConfig.cpp @@ -4,20 +4,20 @@ * @author Alex Cunningham */ -#include +#include #include #define GTSAM_MAGIC_KEY -#include -#include -#include -#include +#include +#include +#include +#include -#include "Vector.h" -#include "Key.h" -#include "VectorConfig.h" -#include "TupleConfig-inl.h" +#include +#include +#include +#include using namespace gtsam; using namespace std; diff --git a/tests/timeGaussianFactorGraph.cpp b/tests/timeGaussianFactorGraph.cpp index 6381acfd6..0698eb81a 100644 --- a/tests/timeGaussianFactorGraph.cpp +++ b/tests/timeGaussianFactorGraph.cpp @@ -9,9 +9,9 @@ #include #include #include // for operator += in Ordering -#include -#include "smallExample.h" -#include "Ordering.h" +#include +#include +#include using namespace std; using namespace gtsam; diff --git a/wrap/Makefile.am b/wrap/Makefile.am index 9b63da720..a0e528b2b 100644 --- a/wrap/Makefile.am +++ b/wrap/Makefile.am @@ -18,11 +18,11 @@ noinst_HEADERS = geometry.h utilities.h Argument.h Constructor.h Method.h Class. noinst_PROGRAMS = wrap wrap_SOURCES = ${common} wrap.cpp -AM_CPPFLAGS = -I$(boost) -I$(top_srcdir) -DTOPSRCDIR="\"$(top_srcdir)\"" +AM_CPPFLAGS = -I$(boost) -I$(BORG_SRCROOT) -DTOPSRCDIR="\"$(top_srcdir)\"" AM_CXXFLAGS = -MMD AM_LDFLAGS = -L../CppUnitLite -lCppUnitLite $(BOOST_LDFLAGS) -TESTS = $(check_PROGRAMS) +#TESTS = $(check_PROGRAMS) # install the headers and matlab toolbox install-exec-hook: all diff --git a/wrap/testSpirit.cpp b/wrap/testSpirit.cpp index 8243b8285..b639c0ae5 100644 --- a/wrap/testSpirit.cpp +++ b/wrap/testSpirit.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include using namespace std; using namespace BOOST_SPIRIT_CLASSIC_NS; diff --git a/wrap/testWrap.cpp b/wrap/testWrap.cpp index cf29c4616..c37d38027 100644 --- a/wrap/testWrap.cpp +++ b/wrap/testWrap.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include "utilities.h" #include "Module.h"