From fea5beb63819085e52e96a58314dda55a02690ca Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Mon, 12 Jul 2010 07:16:31 +0000 Subject: [PATCH] Re-organization: moving all files. I re-organized into original cpp directory and 4 additional directories: base, geometry, slam, and tests. cpp will be further renamed/sub-divided and contains the core library. I wanted it not depend on geometry or slam, which necessitated moving complicated tests to a dedicated directory. --- .cproject | 983 +++++++++++------- CppUnitLite/Makefile | 35 - CppUnitLite/Makefile.am | 12 + CppUnitLite/Makefile.in | 489 +++++++++ LICENSE | 11 + Makefile.am | 67 +- THANKS | 18 + {cpp => base}/BTree.h | 0 {cpp => base}/DSF.h | 3 - {cpp => base}/DSFVector.cpp | 0 {cpp => base}/DSFVector.h | 0 {cpp => base}/Lie-inl.h | 0 {cpp => base}/Lie.h | 0 base/Makefile.am | 86 ++ base/Makefile.in | 777 ++++++++++++++ {cpp => base}/Matrix.cpp | 81 +- {cpp => base}/Matrix.h | 4 +- {cpp => base}/SPQRUtil.cpp | 0 {cpp => base}/SPQRUtil.h | 0 {cpp => base}/Testable.h | 0 {cpp => base}/Vector.cpp | 0 {cpp => base}/Vector.h | 0 {cpp => base}/numericalDerivative.h | 0 {cpp => base}/svdcmp.cpp | 0 {cpp => base}/svdcmp.h | 0 {cpp => base}/testBTree.cpp | 21 +- {cpp => base}/testDSF.cpp | 10 +- {cpp => base}/testDSFVector.cpp | 1 - {cpp => base}/testMatrix.cpp | 0 {cpp => base}/testSPQRUtil.cpp | 0 {cpp => base}/testVector.cpp | 0 {cpp => base}/timeMatrix.cpp | 0 colamd/Makefile | 38 - colamd/Makefile.am | 15 + colamd/Makefile.in | 541 ++++++++++ config.h.in | 89 ++ configure.ac | 24 +- cpp/FactorGraph-inl.h | 12 +- cpp/ISAM2-inl.h | 3 +- cpp/Makefile.am | 370 ++----- cpp/SymbolicFactorGraph.cpp | 37 - cpp/SymbolicFactorGraph.h | 13 +- cpp/Value.h | 44 - cpp/graph-inl.h | 1 + cpp/gtsam.sln | 20 - cpp/gtsam.vcproj | 362 ------- cpp/manual.mk | 139 --- cpp/testBayesNetPreconditioner.cpp | 64 -- cpp/testBayesTree.cpp | 1 - cpp/testBinaryBayesNet.cpp | 1 - cpp/testConstraintOptimizer.cpp | 79 -- cpp/testGaussianFactor.cpp | 336 ------ cpp/testISAM.cpp | 1 - cpp/testJunctionTree.cpp | 59 -- cpp/testLieConfig.cpp | 1 - cpp/testOrdering.cpp | 1 - cpp/testSymbolicBayesNet.cpp | 27 - cpp/testSymbolicFactorGraph.cpp | 117 +-- {cpp => geometry}/Cal3_S2.cpp | 0 {cpp => geometry}/Cal3_S2.h | 0 {cpp => geometry}/CalibratedCamera.cpp | 0 {cpp => geometry}/CalibratedCamera.h | 0 geometry/Makefile.in | 823 +++++++++++++++ {cpp => geometry}/Point2.cpp | 0 {cpp => geometry}/Point2.h | 0 {cpp => geometry}/Point3.cpp | 0 {cpp => geometry}/Point3.h | 0 {cpp => geometry}/Pose2.cpp | 0 {cpp => geometry}/Pose2.h | 0 {cpp => geometry}/Pose3.cpp | 1 - {cpp => geometry}/Pose3.h | 0 {cpp => geometry}/Rot2.cpp | 0 {cpp => geometry}/Rot2.h | 0 {cpp => geometry}/Rot3.cpp | 0 {cpp => geometry}/Rot3.h | 0 {cpp => geometry}/SimpleCamera.cpp | 0 {cpp => geometry}/SimpleCamera.h | 0 {cpp => geometry}/Tensor1.h | 0 {cpp => geometry}/Tensor1Expression.h | 0 {cpp => geometry}/Tensor2.h | 0 {cpp => geometry}/Tensor2Expression.h | 0 {cpp => geometry}/Tensor3.h | 0 {cpp => geometry}/Tensor3Expression.h | 0 {cpp => geometry}/Tensor4.h | 0 {cpp => geometry}/Tensor5.h | 0 {cpp => geometry}/Tensor5Expression.h | 0 {cpp => geometry}/projectiveGeometry.cpp | 0 {cpp => geometry}/projectiveGeometry.h | 0 {cpp => geometry}/tensorInterface.cpp | 0 {cpp => geometry}/tensorInterface.h | 0 {cpp => geometry}/tensors.h | 0 {cpp => geometry}/testCal3_S2.cpp | 0 {cpp => geometry}/testCalibratedCamera.cpp | 0 {cpp => geometry}/testHomography2.cpp | 0 {cpp => geometry}/testPoint2.cpp | 0 {cpp => geometry}/testPoint3.cpp | 0 {cpp => geometry}/testPose2.cpp | 0 {cpp => geometry}/testPose3.cpp | 0 {cpp => geometry}/testRot2.cpp | 0 {cpp => geometry}/testRot3.cpp | 0 {cpp => geometry}/testSimpleCamera.cpp | 0 {cpp => geometry}/testTensors.cpp | 0 {cpp => geometry}/testTrifocal.cpp | 0 {cpp => geometry}/timeRot3.cpp | 0 ldl/Makefile | 39 - ldl/Makefile.am | 8 + ldl/Makefile.in | 483 +++++++++ myconfigure | 2 +- {cpp => slam}/BearingFactor.h | 0 {cpp => slam}/BearingRangeFactor.h | 0 {cpp => slam}/BetweenFactor.h | 0 {cpp => slam}/GaussianISAM2.cpp | 4 +- {cpp => slam}/GaussianISAM2.h | 0 slam/Makefile.am | 77 ++ slam/Makefile.in | 867 +++++++++++++++ {cpp => slam}/Pose2SLAMOptimizer.cpp | 0 {cpp => slam}/Pose2SLAMOptimizer.h | 0 {cpp => slam}/PriorFactor.h | 0 {cpp => slam}/RangeFactor.h | 0 {cpp => slam}/Simulated2DConfig.h | 0 {cpp => slam}/Simulated2DMeasurement.h | 0 slam/Simulated2DOdometry.h | 18 + {cpp => slam}/Simulated2DOrientedConfig.h | 0 {cpp => slam}/Simulated2DOrientedOdometry.h | 0 {cpp => slam}/Simulated2DOrientedPosePrior.h | 0 {cpp => slam}/Simulated2DPointPrior.h | 0 {cpp => slam}/Simulated2DPosePrior.h | 0 {cpp => slam}/Simulated3D.cpp | 0 {cpp => slam}/Simulated3D.h | 0 {cpp => slam}/dataset.cpp | 0 {cpp => slam}/dataset.h | 0 {cpp => slam}/planarSLAM.cpp | 0 {cpp => slam}/planarSLAM.h | 0 {cpp => slam}/pose2SLAM.cpp | 0 {cpp => slam}/pose2SLAM.h | 0 {cpp => slam}/pose3SLAM.cpp | 0 {cpp => slam}/pose3SLAM.h | 0 slam/saveGraph.cpp | 58 ++ slam/saveGraph.h | 25 + {cpp => slam}/simulated2D.cpp | 0 {cpp => slam}/simulated2D.h | 0 {cpp => slam}/simulated2DOriented.cpp | 0 {cpp => slam}/simulated2DOriented.h | 2 +- {cpp => slam}/testPlanarSLAM.cpp | 0 {cpp => slam}/testPose2Config.cpp | 0 {cpp => slam}/testPose2Factor.cpp | 0 {cpp => slam}/testPose2Prior.cpp | 0 {cpp => slam}/testPose2SLAM.cpp | 0 {cpp => slam}/testPose3Config.cpp | 0 {cpp => slam}/testPose3Factor.cpp | 0 {cpp => slam}/testPose3SLAM.cpp | 0 {cpp => slam}/testSimulated2D.cpp | 0 {cpp => slam}/testSimulated2DOriented.cpp | 0 {cpp => slam}/testSimulated3D.cpp | 0 {cpp => slam}/testVSLAMConfig.cpp | 0 {cpp => slam}/testVSLAMFactor.cpp | 0 {cpp => slam}/testVSLAMGraph.cpp | 0 {cpp => slam}/visualSLAM.cpp | 0 {cpp => slam}/visualSLAM.h | 0 spqr_mini/Makefile.am | 39 +- tests/Makefile.am | 36 + tests/Makefile.in | 837 +++++++++++++++ {cpp => tests}/smallExample.cpp | 0 {cpp => tests}/smallExample.h | 0 tests/testBayesNetPreconditioner.cpp | 90 ++ tests/testConstraintOptimizer.cpp | 107 ++ {cpp => tests}/testGaussianBayesNet.cpp | 0 tests/testGaussianFactor.cpp | 379 +++++++ {cpp => tests}/testGaussianFactorGraph.cpp | 0 {cpp => tests}/testGaussianISAM.cpp | 0 {cpp => tests}/testGaussianISAM2.cpp | 1 - {cpp => tests}/testGraph.cpp | 0 {cpp => tests}/testInference.cpp | 0 {cpp => tests}/testIterative.cpp | 0 tests/testJunctionTree.cpp | 85 ++ {cpp => tests}/testNonlinearEquality.cpp | 0 {cpp => tests}/testNonlinearFactor.cpp | 0 {cpp => tests}/testNonlinearFactorGraph.cpp | 0 {cpp => tests}/testNonlinearOptimizer.cpp | 0 {cpp => tests}/testSQP.cpp | 0 {cpp => tests}/testSubgraphPreconditioner.cpp | 0 tests/testSymbolicBayesNet.cpp | 59 ++ tests/testSymbolicFactorGraph.cpp | 142 +++ {cpp => tests}/testTupleConfig.cpp | 0 {cpp => tests}/timeGaussianFactorGraph.cpp | 0 wrap/Makefile.am | 4 +- 186 files changed, 6951 insertions(+), 2228 deletions(-) delete mode 100644 CppUnitLite/Makefile create mode 100644 CppUnitLite/Makefile.am create mode 100644 CppUnitLite/Makefile.in create mode 100644 THANKS rename {cpp => base}/BTree.h (100%) rename {cpp => base}/DSF.h (98%) rename {cpp => base}/DSFVector.cpp (100%) rename {cpp => base}/DSFVector.h (100%) rename {cpp => base}/Lie-inl.h (100%) rename {cpp => base}/Lie.h (100%) create mode 100644 base/Makefile.am create mode 100644 base/Makefile.in rename {cpp => base}/Matrix.cpp (95%) rename {cpp => base}/Matrix.h (98%) rename {cpp => base}/SPQRUtil.cpp (100%) rename {cpp => base}/SPQRUtil.h (100%) rename {cpp => base}/Testable.h (100%) rename {cpp => base}/Vector.cpp (100%) rename {cpp => base}/Vector.h (100%) rename {cpp => base}/numericalDerivative.h (100%) rename {cpp => base}/svdcmp.cpp (100%) rename {cpp => base}/svdcmp.h (100%) rename {cpp => base}/testBTree.cpp (91%) rename {cpp => base}/testDSF.cpp (97%) rename {cpp => base}/testDSFVector.cpp (99%) rename {cpp => base}/testMatrix.cpp (100%) rename {cpp => base}/testSPQRUtil.cpp (100%) rename {cpp => base}/testVector.cpp (100%) rename {cpp => base}/timeMatrix.cpp (100%) delete mode 100755 colamd/Makefile create mode 100644 colamd/Makefile.am create mode 100644 colamd/Makefile.in create mode 100644 config.h.in delete mode 100644 cpp/Value.h delete mode 100644 cpp/gtsam.sln delete mode 100644 cpp/gtsam.vcproj delete mode 100644 cpp/manual.mk rename {cpp => geometry}/Cal3_S2.cpp (100%) rename {cpp => geometry}/Cal3_S2.h (100%) rename {cpp => geometry}/CalibratedCamera.cpp (100%) rename {cpp => geometry}/CalibratedCamera.h (100%) create mode 100644 geometry/Makefile.in rename {cpp => geometry}/Point2.cpp (100%) rename {cpp => geometry}/Point2.h (100%) rename {cpp => geometry}/Point3.cpp (100%) rename {cpp => geometry}/Point3.h (100%) rename {cpp => geometry}/Pose2.cpp (100%) rename {cpp => geometry}/Pose2.h (100%) rename {cpp => geometry}/Pose3.cpp (99%) rename {cpp => geometry}/Pose3.h (100%) rename {cpp => geometry}/Rot2.cpp (100%) rename {cpp => geometry}/Rot2.h (100%) rename {cpp => geometry}/Rot3.cpp (100%) rename {cpp => geometry}/Rot3.h (100%) rename {cpp => geometry}/SimpleCamera.cpp (100%) rename {cpp => geometry}/SimpleCamera.h (100%) rename {cpp => geometry}/Tensor1.h (100%) rename {cpp => geometry}/Tensor1Expression.h (100%) rename {cpp => geometry}/Tensor2.h (100%) rename {cpp => geometry}/Tensor2Expression.h (100%) rename {cpp => geometry}/Tensor3.h (100%) rename {cpp => geometry}/Tensor3Expression.h (100%) rename {cpp => geometry}/Tensor4.h (100%) rename {cpp => geometry}/Tensor5.h (100%) rename {cpp => geometry}/Tensor5Expression.h (100%) rename {cpp => geometry}/projectiveGeometry.cpp (100%) rename {cpp => geometry}/projectiveGeometry.h (100%) rename {cpp => geometry}/tensorInterface.cpp (100%) rename {cpp => geometry}/tensorInterface.h (100%) rename {cpp => geometry}/tensors.h (100%) rename {cpp => geometry}/testCal3_S2.cpp (100%) rename {cpp => geometry}/testCalibratedCamera.cpp (100%) rename {cpp => geometry}/testHomography2.cpp (100%) rename {cpp => geometry}/testPoint2.cpp (100%) rename {cpp => geometry}/testPoint3.cpp (100%) rename {cpp => geometry}/testPose2.cpp (100%) rename {cpp => geometry}/testPose3.cpp (100%) rename {cpp => geometry}/testRot2.cpp (100%) rename {cpp => geometry}/testRot3.cpp (100%) rename {cpp => geometry}/testSimpleCamera.cpp (100%) rename {cpp => geometry}/testTensors.cpp (100%) rename {cpp => geometry}/testTrifocal.cpp (100%) rename {cpp => geometry}/timeRot3.cpp (100%) delete mode 100644 ldl/Makefile create mode 100644 ldl/Makefile.am create mode 100644 ldl/Makefile.in rename {cpp => slam}/BearingFactor.h (100%) rename {cpp => slam}/BearingRangeFactor.h (100%) rename {cpp => slam}/BetweenFactor.h (100%) rename {cpp => slam}/GaussianISAM2.cpp (93%) rename {cpp => slam}/GaussianISAM2.h (100%) create mode 100644 slam/Makefile.am create mode 100644 slam/Makefile.in rename {cpp => slam}/Pose2SLAMOptimizer.cpp (100%) rename {cpp => slam}/Pose2SLAMOptimizer.h (100%) rename {cpp => slam}/PriorFactor.h (100%) rename {cpp => slam}/RangeFactor.h (100%) rename {cpp => slam}/Simulated2DConfig.h (100%) rename {cpp => slam}/Simulated2DMeasurement.h (100%) create mode 100644 slam/Simulated2DOdometry.h rename {cpp => slam}/Simulated2DOrientedConfig.h (100%) rename {cpp => slam}/Simulated2DOrientedOdometry.h (100%) rename {cpp => slam}/Simulated2DOrientedPosePrior.h (100%) rename {cpp => slam}/Simulated2DPointPrior.h (100%) rename {cpp => slam}/Simulated2DPosePrior.h (100%) rename {cpp => slam}/Simulated3D.cpp (100%) rename {cpp => slam}/Simulated3D.h (100%) rename {cpp => slam}/dataset.cpp (100%) rename {cpp => slam}/dataset.h (100%) rename {cpp => slam}/planarSLAM.cpp (100%) rename {cpp => slam}/planarSLAM.h (100%) rename {cpp => slam}/pose2SLAM.cpp (100%) rename {cpp => slam}/pose2SLAM.h (100%) rename {cpp => slam}/pose3SLAM.cpp (100%) rename {cpp => slam}/pose3SLAM.h (100%) create mode 100644 slam/saveGraph.cpp create mode 100644 slam/saveGraph.h rename {cpp => slam}/simulated2D.cpp (100%) rename {cpp => slam}/simulated2D.h (100%) rename {cpp => slam}/simulated2DOriented.cpp (100%) rename {cpp => slam}/simulated2DOriented.h (96%) rename {cpp => slam}/testPlanarSLAM.cpp (100%) rename {cpp => slam}/testPose2Config.cpp (100%) rename {cpp => slam}/testPose2Factor.cpp (100%) rename {cpp => slam}/testPose2Prior.cpp (100%) rename {cpp => slam}/testPose2SLAM.cpp (100%) rename {cpp => slam}/testPose3Config.cpp (100%) rename {cpp => slam}/testPose3Factor.cpp (100%) rename {cpp => slam}/testPose3SLAM.cpp (100%) rename {cpp => slam}/testSimulated2D.cpp (100%) rename {cpp => slam}/testSimulated2DOriented.cpp (100%) rename {cpp => slam}/testSimulated3D.cpp (100%) rename {cpp => slam}/testVSLAMConfig.cpp (100%) rename {cpp => slam}/testVSLAMFactor.cpp (100%) rename {cpp => slam}/testVSLAMGraph.cpp (100%) rename {cpp => slam}/visualSLAM.cpp (100%) rename {cpp => slam}/visualSLAM.h (100%) create mode 100644 tests/Makefile.am create mode 100644 tests/Makefile.in rename {cpp => tests}/smallExample.cpp (100%) rename {cpp => tests}/smallExample.h (100%) create mode 100644 tests/testBayesNetPreconditioner.cpp create mode 100644 tests/testConstraintOptimizer.cpp rename {cpp => tests}/testGaussianBayesNet.cpp (100%) create mode 100644 tests/testGaussianFactor.cpp rename {cpp => tests}/testGaussianFactorGraph.cpp (100%) rename {cpp => tests}/testGaussianISAM.cpp (100%) rename {cpp => tests}/testGaussianISAM2.cpp (99%) rename {cpp => tests}/testGraph.cpp (100%) rename {cpp => tests}/testInference.cpp (100%) rename {cpp => tests}/testIterative.cpp (100%) create mode 100644 tests/testJunctionTree.cpp rename {cpp => tests}/testNonlinearEquality.cpp (100%) rename {cpp => tests}/testNonlinearFactor.cpp (100%) rename {cpp => tests}/testNonlinearFactorGraph.cpp (100%) rename {cpp => tests}/testNonlinearOptimizer.cpp (100%) rename {cpp => tests}/testSQP.cpp (100%) rename {cpp => tests}/testSubgraphPreconditioner.cpp (100%) create mode 100644 tests/testSymbolicBayesNet.cpp create mode 100644 tests/testSymbolicFactorGraph.cpp rename {cpp => tests}/testTupleConfig.cpp (100%) rename {cpp => tests}/timeGaussianFactorGraph.cpp (100%) diff --git a/.cproject b/.cproject index c8509cd4e..cf4a82bfd 100644 --- a/.cproject +++ b/.cproject @@ -300,8 +300,279 @@ + + make + + check + true + true + true + + + make + + clean + true + true + true + + + make + + testBTree.run + true + true + true + + + make + + testDSF.run + true + true + true + + + make + + testDSFVector.run + true + true + true + + + make + + testMatrix.run + true + true + true + + + make + + testSPQRUtil.run + true + true + true + + + make + + testVector.run + true + true + true + + + make + + timeMatrix.run + true + true + true + + + make + + all + true + true + true + + + make + + check + true + true + true + + + make + + testGaussianFactorGraph.run + true + true + true + + + make + + testGaussianISAM.run + true + true + true + + + make + + testGaussianISAM2.run + true + true + true + + + make + + testGraph.run + true + false + true + + + make + + testIterative.run + true + true + true + + + make + + testNonlinearEquality.run + true + true + true + + + make + + testNonlinearFactor.run + true + true + true + + + make + + testNonlinearFactorGraph.run + true + true + true + + + make + + testNonlinearOptimizer.run + true + true + true + + + make + + testSQP.run + true + true + true + + + make + + testSubgraphPreconditioner.run + true + true + true + + + make + + testTupleConfig.run + true + true + true + + + make + + timeGaussianFactorGraph.run + true + true + true + + + make + + testBayesNetPreconditioner.run + true + true + true + + + make + + testConstraintOptimizer.run + true + true + true + + + make + + testInference.run + true + false + true + + + make + + testGaussianBayesNet.run + true + false + true + + + make + + testGaussianFactor.run + true + false + true + + + make + + testJunctionTree.run + true + false + true + + + make + + testSymbolicBayesNet.run + true + false + true + + + make + + testSymbolicFactorGraph.run + true + false + true + + + make + install + true + true + true + + + make + clean + true + true + true + make + all true true @@ -309,28 +580,21 @@ make + clean true true true - + make - -j2 - install + + all true true true - - make - -j2 - check - true - true - true - - + make clean @@ -346,38 +610,6 @@ false true - - make - -j2 - testSimpleCamera.run - true - true - true - - - make - -f local.mk - testCal3_S2.run - true - true - true - - - make - -j2 - testVSLAMFactor.run - true - true - true - - - make - -j2 - testCalibratedCamera.run - true - true - true - make -j2 @@ -386,30 +618,6 @@ true true - - make - -j2 - testPose2.run - true - true - true - - - make - -j2 - testRot3.run - true - true - true - - - make - -j2 - testNonlinearOptimizer.run - true - true - true - make -j2 @@ -418,30 +626,6 @@ true true - - make - -j2 - testGaussianFactorGraph.run - true - true - true - - - make - -j2 - testNonlinearFactorGraph.run - true - true - true - - - make - -j2 - testPose3.run - true - true - true - make -j2 @@ -450,22 +634,6 @@ true true - - make - -j2 - testPoint2.run - true - true - true - - - make - -j2 - testNonlinearFactor.run - true - true - true - make -j2 @@ -474,24 +642,9 @@ true true - - make - -j2 - timeGaussianFactorGraph.run - true - true - true - - - make - -j2 - testGaussianBayesNet.run - true - true - true - make + testBayesTree.run true false @@ -499,7 +652,6 @@ make - testSymbolicBayesNet.run true false @@ -507,51 +659,12 @@ make + testSymbolicFactorGraph.run true false true - - make - -j2 - testVector.run - true - true - true - - - make - -j2 - testMatrix.run - true - true - true - - - make - -j2 - testVSLAMGraph.run - true - true - true - - - make - -j2 - testNonlinearEquality.run - true - true - true - - - make - -j2 - testSQP.run - true - true - true - make -j2 @@ -560,14 +673,6 @@ true true - - make - -j2 - testVSLAMConfig.run - true - true - true - make -j2 @@ -576,70 +681,6 @@ true true - - make - -j2 - testRot2.run - true - true - true - - - make - -j2 - testGaussianBayesTree.run - true - true - true - - - make - -j2 - testPose3Config.run - true - true - true - - - make - -j2 - testUrbanMeasurement.run - true - true - true - - - make - -j2 - testUrbanOdometry.run - true - true - true - - - make - -j2 - testIterative.run - true - true - true - - - make - -j2 - testGaussianISAM2.run - true - true - true - - - make - -j2 - testSubgraphPreconditioner.run - true - true - true - make -j2 @@ -648,38 +689,6 @@ true true - - make - -j2 - testPose2Factor.run - true - true - true - - - make - -j2 - timeRot3.run - true - true - true - - - make - -j2 - testPose2SLAM.run - true - true - true - - - make - -j2 - testPose2Config.run - true - true - true - make -j2 @@ -688,45 +697,6 @@ true true - - make - -j2 - testPlanarSLAM.run - true - true - true - - - make - testGraph.run - true - false - true - - - make - -j2 - testPose3SLAM.run - true - true - true - - - make - -j2 - testTupleConfig.run - true - true - true - - - make - -j2 - testPose2Prior.run - true - true - true - make -j2 @@ -743,30 +713,6 @@ true true - - make - -j2 - testGaussianISAM.run - true - true - true - - - make - - testSimulated2D.run - true - false - true - - - make - -j2 - timeMatrix.run - true - true - true - make -j2 @@ -783,14 +729,6 @@ true true - - make - -j2 - testHomography2.run - true - true - true - make -j2 @@ -801,18 +739,12 @@ make + testErrors.run true false true - - make - testDSF.run - true - true - true - make -j2 @@ -823,48 +755,42 @@ make + testConstraintOptimizer.run true true true - + make - testBTree.run + clean true true true - + make - testSimulated2DOriented.run + + all + true + true + true + + + make + + testSymbolicFactor.run true false true - + make - testDSFVector.run + testBinaryBayesNet.run true - true - true - - - make - - testSPQRUtil.run - true - true - true - - - make - - testInference.run - true - true + false true @@ -875,6 +801,307 @@ true true + + make + + timeSymbolMaps.run + true + true + true + + + make + + all + true + true + true + + + make + + clean + true + true + true + + + make + all + true + true + true + + + make + clean + true + true + true + + + make + + clean all + true + true + true + + + make + + all + true + true + true + + + make + + check + true + true + true + + + make + + clean + true + true + true + + + make + + testPlanarSLAM.run + true + true + true + + + make + + testPose2Config.run + true + true + true + + + make + + testPose2Factor.run + true + true + true + + + make + + testPose2Prior.run + true + true + true + + + make + + testPose2SLAM.run + true + true + true + + + make + + testPose3Config.run + true + true + true + + + make + + testPose3SLAM.run + true + true + true + + + make + + testSimulated2DOriented.run + true + false + true + + + make + + testVSLAMConfig.run + true + true + true + + + make + + testVSLAMFactor.run + true + true + true + + + make + + testVSLAMGraph.run + true + true + true + + + make + + testPose3Factor.run + true + true + true + + + make + + testSimulated2D.run + true + false + true + + + make + + testSimulated3D.run + true + false + true + + + make + -j2 + install + true + true + true + + + make + -j2 + check + true + true + true + + + make + clean + true + true + true + + + make + + testRot3.run + true + true + true + + + make + + testRot2.run + true + true + true + + + make + + testPose3.run + true + true + true + + + make + + timeRot3.run + true + true + true + + + make + + testPose2.run + true + true + true + + + make + + testCal3_S2.run + true + true + true + + + make + + testSimpleCamera.run + true + true + true + + + make + + testHomography2.run + true + true + true + + + make + + testCalibratedCamera.run + true + true + true + + + make + + check + true + true + true + + + make + + clean + true + true + true + + + make + + testPoint2.run + true + true + true + make -j2 @@ -899,6 +1126,22 @@ true true + + make + + all + true + true + true + + + make + + dist + true + true + true + diff --git a/CppUnitLite/Makefile b/CppUnitLite/Makefile deleted file mode 100644 index b319919b5..000000000 --- a/CppUnitLite/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# Makefile to compile the unit test library, will end up in $(LIBDIR) - -.PHONY: all install clean - -all: libCppUnitLite.a - -CC ?= gcc -CXX ?= g++ -CPP ?= cpp -CXXFLAGS += -O2 - -sources = $(shell ls *.cpp) -objects = $(sources:.cpp=.o) - -library = libCppUnitLite.a - -$(library): $(objects) - ar crsv $@ $(objects) - ranlib $(library) - -clean: - rm -f *.o *.*~ $(library) - -check: - echo 'no check for CppUnitLite' - -distdir: - -# Richard: added the following dependencies so that recursive make works: - -install: all - -distclean: clean - -check: all diff --git a/CppUnitLite/Makefile.am b/CppUnitLite/Makefile.am new file mode 100644 index 000000000..132aead77 --- /dev/null +++ b/CppUnitLite/Makefile.am @@ -0,0 +1,12 @@ +#---------------------------------------------------------------------------------------------------- +# CppUnitLite +# replaced Makefile with automake for easy linking +#---------------------------------------------------------------------------------------------------- + +headers = TestHarness.h +sources = Failure.cpp SimpleString.cpp Test.cpp TestRegistry.cpp TestResult.cpp +headers += $(sources:.cpp=.h) + +noinst_HEADERS = $(headers) +noinst_LIBRARIES = libCppUnitLite.a +libCppUnitLite_a_SOURCES = $(sources) diff --git a/CppUnitLite/Makefile.in b/CppUnitLite/Makefile.in new file mode 100644 index 000000000..eacaf1492 --- /dev/null +++ b/CppUnitLite/Makefile.in @@ -0,0 +1,489 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#---------------------------------------------------------------------------------------------------- +# CppUnitLite +# replaced Makefile with automake for easy linking +#---------------------------------------------------------------------------------------------------- + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = CppUnitLite +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libCppUnitLite_a_AR = $(AR) $(ARFLAGS) +libCppUnitLite_a_LIBADD = +am__objects_1 = Failure.$(OBJEXT) SimpleString.$(OBJEXT) \ + Test.$(OBJEXT) TestRegistry.$(OBJEXT) TestResult.$(OBJEXT) +am_libCppUnitLite_a_OBJECTS = $(am__objects_1) +libCppUnitLite_a_OBJECTS = $(am_libCppUnitLite_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libCppUnitLite_a_SOURCES) +DIST_SOURCES = $(libCppUnitLite_a_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +boost = @boost@ +boost_serialization = @boost_serialization@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +toolbox = @toolbox@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +headers = TestHarness.h $(sources:.cpp=.h) +sources = Failure.cpp SimpleString.cpp Test.cpp TestRegistry.cpp TestResult.cpp +noinst_HEADERS = $(headers) +noinst_LIBRARIES = libCppUnitLite.a +libCppUnitLite_a_SOURCES = $(sources) +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CppUnitLite/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu CppUnitLite/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libCppUnitLite.a: $(libCppUnitLite_a_OBJECTS) $(libCppUnitLite_a_DEPENDENCIES) + -rm -f libCppUnitLite.a + $(libCppUnitLite_a_AR) libCppUnitLite.a $(libCppUnitLite_a_OBJECTS) $(libCppUnitLite_a_LIBADD) + $(RANLIB) libCppUnitLite.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Failure.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SimpleString.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestRegistry.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestResult.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) $(HEADERS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/LICENSE b/LICENSE index 47889e5eb..5f8f6cde4 100644 --- a/LICENSE +++ b/LICENSE @@ -1 +1,12 @@ The GTSAM library has not been licensed yet. See also COPYING + + +GTSAM depends on the following packages that are built locally: + +UFconfig +Copyright (c) 2006-2009, Timothy A. Davis. Distributed under the GNU LGPL license. + +CCOLAMD +Copyright (c) 1998-2007, University of Florida. Author: Timothy A. Davis, Siva Rajamanickam, +and Stefan Larimore. The COLAMD algorithm was developed in collaboration Esmond Ng and John Gilbert. +Distributed under the GNU LGPL license. diff --git a/Makefile.am b/Makefile.am index 3c9b964b3..4cfb21b70 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,46 +1,49 @@ +#---------------------------------------------------------------------------------------------------- +# GTSAM top-level automake file +#---------------------------------------------------------------------------------------------------- + #The option -I m4 tells Autoconf to look for additional Autoconf macros in the m4 subdirectory. ACLOCAL_AMFLAGS = -I m4 # make automake install some standard but missing files AUTOMAKE_OPTIONS = foreign -SUBDIRS = colamd CppUnitLite ldl spqr_mini cpp wrap -# install the matlab toolbox +# All the sub-directories that need to be built +SUBDIRS = CppUnitLite colamd ldl spqr_mini base cpp geometry slam . tests wrap + +# And the corresponding libraries produced +SUBLIBS = colamd/libcolamd.la ldl/libldl.la \ + base/libbase.la cpp/libcpp.la geometry/libgeometry.la slam/libslam.la + +if USE_LAPACK +SUBLIBS += spqr_mini/libspqr_mini.la +endif + +EXTRA_DIST = autogen.sh configure.ac THANKS + +# The following lines specify the actual shared library to be built with libtool +lib_LTLIBRARIES = libgtsam.la +libgtsam_la_SOURCES = +libgtsam_la_LIBADD = $(SUBLIBS) +libgtsam_la_LDFLAGS = -version-info 0:0:0 + +# TODO: UFconfig, CCOLAMD, and LDL automake magic without adding or touching any file +# in those directories as to not invalidate the LGPL license +# See some possibilities in +# http://www.gnu.org/software/hello/manual/automake/Third_002dParty-Makefiles.html + +# install the headers and matlab toolbox install-exec-hook: install -d ${toolbox}/gtsam && \ cp -rf toolbox/* ${toolbox}/gtsam && \ install -d ${prefix}/include/wrap && \ - cp -f wrap/wrap-matlab.h ${prefix}/include/wrap/matlab.h && \ - install -d $(prefix)/include && \ - install -d $(prefix)/include/colamd && \ - cp -f colamd/colamd.h $(prefix)/include/colamd/ && \ - cp -f colamd/ccolamd.h $(prefix)/include/colamd/ && \ - cp -f colamd/UFconfig.h $(prefix)/include/colamd/ && \ - cp -f colamd/libcolamd.a $(prefix)/lib/ && \ - install -d $(prefix)/include/ldl && \ - cp -f ldl/ldl.h $(prefix)/include/ldl/ && \ - cp -f ldl/UFconfig.h $(prefix)/include/ldl/ && \ - cp -f ldl/libldl.a $(prefix)/lib/ + cp -f wrap/wrap-matlab.h ${prefix}/include/wrap/matlab.h +# Todo: Also do CppUnitLite with automake dist-hook: - mkdir $(distdir)/CppUnitLite - cp -p $(srcdir)/CppUnitLite/Makefile $(distdir)/CppUnitLite - cp -p $(srcdir)/CppUnitLite/*.h $(distdir)/CppUnitLite - cp -p $(srcdir)/CppUnitLite/*.cpp $(distdir)/CppUnitLite - mkdir $(distdir)/colamd - cp -p $(srcdir)/colamd/Makefile $(distdir)/colamd - cp -p $(srcdir)/colamd/*.h $(distdir)/colamd - cp -p $(srcdir)/colamd/*.c $(distdir)/colamd - cp -p $(srcdir)/colamd/*.cpp $(distdir)/colamd - mkdir $(distdir)/ldl - cp -p $(srcdir)/ldl/Makefile $(distdir)/ldl - cp -p $(srcdir)/ldl/*.h $(distdir)/ldl - cp -p $(srcdir)/ldl/*.c $(distdir)/ldl - cp -p $(srcdir)/ldl/*.cpp $(distdir)/ldl - mkdir $(distdir)/spqr_mini - cp -p $(srcdir)/spqr_mini/Makefile $(distdir)/spqr_mini - cp -p $(srcdir)/spqr_mini/*.h $(distdir)/spqr_mini - cp -p $(srcdir)/spqr_mini/*.c $(distdir)/spqr_mini - cp -p $(srcdir)/spqr_mini/*.cpp $(distdir)/spqr_mini + mkdir $(distdir)/config mkdir $(distdir)/matlab cp -p $(srcdir)/matlab/*.m $(distdir)/matlab + cp -r $(srcdir)/wrap/expected $(distdir)/wrap + + diff --git a/THANKS b/THANKS new file mode 100644 index 000000000..d6c649927 --- /dev/null +++ b/THANKS @@ -0,0 +1,18 @@ +GTSAM was made possible by the efforts of many collaborators at Georgia Tech + +Doru Balcan +Alex Cunningham +Alireza Fathi +Eohan George +Viorela Ila +Yong-Dian Jian +Michael Kaess +Kai Ni +Carlos Nieto +Manohar Paluri +Christian Potthast +Richard Roberts +Grant Schindler + +Many thanks for your hard work!!!! +Frank Dellaert diff --git a/cpp/BTree.h b/base/BTree.h similarity index 100% rename from cpp/BTree.h rename to base/BTree.h diff --git a/cpp/DSF.h b/base/DSF.h similarity index 98% rename from cpp/DSF.h rename to base/DSF.h index ce12068cc..4c383ef0c 100644 --- a/cpp/DSF.h +++ b/base/DSF.h @@ -20,8 +20,6 @@ namespace gtsam { - class Symbol; - template class DSF : protected BTree { @@ -153,6 +151,5 @@ namespace gtsam { // shortcuts typedef DSF DSFInt; - typedef DSF DSFSymbol; } // namespace gtsam diff --git a/cpp/DSFVector.cpp b/base/DSFVector.cpp similarity index 100% rename from cpp/DSFVector.cpp rename to base/DSFVector.cpp diff --git a/cpp/DSFVector.h b/base/DSFVector.h similarity index 100% rename from cpp/DSFVector.h rename to base/DSFVector.h diff --git a/cpp/Lie-inl.h b/base/Lie-inl.h similarity index 100% rename from cpp/Lie-inl.h rename to base/Lie-inl.h diff --git a/cpp/Lie.h b/base/Lie.h similarity index 100% rename from cpp/Lie.h rename to base/Lie.h diff --git a/base/Makefile.am b/base/Makefile.am new file mode 100644 index 000000000..1c6619163 --- /dev/null +++ b/base/Makefile.am @@ -0,0 +1,86 @@ +#---------------------------------------------------------------------------------------------------- +# GTSAM base +# provides some base Math and data structures, as well as test-related utilities +#---------------------------------------------------------------------------------------------------- + +headers = +sources = +check_PROGRAMS = + +# base Math +sources += Vector.cpp svdcmp.cpp Matrix.cpp +check_PROGRAMS += testVector testMatrix + +if USE_LAPACK +sources += SPQRUtil.cpp +check_PROGRAMS += testSPQRUtil +endif + +# Testing +headers += Testable.h numericalDerivative.h + +# Lie Groups +headers += Lie.h Lie-inl.h + +# Data structures +headers += BTree.h DSF.h +sources += DSFVector.cpp +check_PROGRAMS += testBTree testDSF testDSFVector + +# Timing tests +noinst_PROGRAMS = timeMatrix + +#---------------------------------------------------------------------------------------------------- +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +# The headers are installed in $(includedir)/gtsam: +#---------------------------------------------------------------------------------------------------- +headers += $(sources:.cpp=.h) +pkginclude_HEADERS = $(headers) +noinst_LTLIBRARIES = libbase.la +libbase_la_SOURCES = $(sources) + +AM_CPPFLAGS = -I$(boost) + +if USE_BLAS +AM_CPPFLAGS += -DGT_USE_CBLAS +endif + +if USE_LAPACK +AM_CPPFLAGS += -DGT_USE_LAPACK +endif + +# On Mac, we compile using the BLAS/LAPACK headers in the Accelerate framework +if USE_ACCELERATE_MACOS +AM_CPPFLAGS += -F Accelerate +endif + +#---------------------------------------------------------------------------------------------------- +# rules to build local programs +#---------------------------------------------------------------------------------------------------- +TESTS = $(check_PROGRAMS) +AM_DEFAULT_SOURCE_EXT = .cpp +AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) +LDADD = libbase.la ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a + +if USE_BLAS_LINUX +AM_LDFLAGS += -lcblas -latlas +endif + +if USE_LAPACK +LDADD += ../spqr_mini/libspqr_mini.la +endif + +if USE_LAPACK_LINUX +AM_LDFLAGS += -llapack +endif + +if USE_ACCELERATE_MACOS +AM_LDFLAGS += -framework Accelerate +endif + +# rule to run an executable +%.run: % $(LDADD) + ./$^ + +#---------------------------------------------------------------------------------------------------- diff --git a/base/Makefile.in b/base/Makefile.in new file mode 100644 index 000000000..499538757 --- /dev/null +++ b/base/Makefile.in @@ -0,0 +1,777 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#---------------------------------------------------------------------------------------------------- +# GTSAM base +# provides some base Math and data structures, as well as test-related utilities +#---------------------------------------------------------------------------------------------------- + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testVector$(EXEEXT) testMatrix$(EXEEXT) \ + $(am__EXEEXT_1) testBTree$(EXEEXT) testDSF$(EXEEXT) \ + testDSFVector$(EXEEXT) +@USE_LAPACK_TRUE@am__append_1 = SPQRUtil.cpp +@USE_LAPACK_TRUE@am__append_2 = testSPQRUtil +noinst_PROGRAMS = timeMatrix$(EXEEXT) +@USE_BLAS_TRUE@am__append_3 = -DGT_USE_CBLAS +@USE_LAPACK_TRUE@am__append_4 = -DGT_USE_LAPACK + +# On Mac, we compile using the BLAS/LAPACK headers in the Accelerate framework +@USE_ACCELERATE_MACOS_TRUE@am__append_5 = -F Accelerate +@USE_BLAS_LINUX_TRUE@am__append_6 = -lcblas -latlas +@USE_LAPACK_TRUE@am__append_7 = ../spqr_mini/libspqr_mini.la +@USE_LAPACK_LINUX_TRUE@am__append_8 = -llapack +@USE_ACCELERATE_MACOS_TRUE@am__append_9 = -framework Accelerate +subdir = base +DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libbase_la_LIBADD = +am__libbase_la_SOURCES_DIST = Vector.cpp svdcmp.cpp Matrix.cpp \ + SPQRUtil.cpp DSFVector.cpp +@USE_LAPACK_TRUE@am__objects_1 = SPQRUtil.lo +am__objects_2 = Vector.lo svdcmp.lo Matrix.lo $(am__objects_1) \ + DSFVector.lo +am_libbase_la_OBJECTS = $(am__objects_2) +libbase_la_OBJECTS = $(am_libbase_la_OBJECTS) +@USE_LAPACK_TRUE@am__EXEEXT_1 = testSPQRUtil$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +testBTree_SOURCES = testBTree.cpp +testBTree_OBJECTS = testBTree.$(OBJEXT) +testBTree_LDADD = $(LDADD) +testBTree_DEPENDENCIES = libbase.la ../ldl/libldl.la \ + ../CppUnitLite/libCppUnitLite.a $(am__append_7) +testDSF_SOURCES = testDSF.cpp +testDSF_OBJECTS = testDSF.$(OBJEXT) +testDSF_LDADD = $(LDADD) +testDSF_DEPENDENCIES = libbase.la ../ldl/libldl.la \ + ../CppUnitLite/libCppUnitLite.a $(am__append_7) +testDSFVector_SOURCES = testDSFVector.cpp +testDSFVector_OBJECTS = testDSFVector.$(OBJEXT) +testDSFVector_LDADD = $(LDADD) +testDSFVector_DEPENDENCIES = libbase.la ../ldl/libldl.la \ + ../CppUnitLite/libCppUnitLite.a $(am__append_7) +testMatrix_SOURCES = testMatrix.cpp +testMatrix_OBJECTS = testMatrix.$(OBJEXT) +testMatrix_LDADD = $(LDADD) +testMatrix_DEPENDENCIES = libbase.la ../ldl/libldl.la \ + ../CppUnitLite/libCppUnitLite.a $(am__append_7) +testSPQRUtil_SOURCES = testSPQRUtil.cpp +testSPQRUtil_OBJECTS = testSPQRUtil.$(OBJEXT) +testSPQRUtil_LDADD = $(LDADD) +testSPQRUtil_DEPENDENCIES = libbase.la ../ldl/libldl.la \ + ../CppUnitLite/libCppUnitLite.a $(am__append_7) +testVector_SOURCES = testVector.cpp +testVector_OBJECTS = testVector.$(OBJEXT) +testVector_LDADD = $(LDADD) +testVector_DEPENDENCIES = libbase.la ../ldl/libldl.la \ + ../CppUnitLite/libCppUnitLite.a $(am__append_7) +timeMatrix_SOURCES = timeMatrix.cpp +timeMatrix_OBJECTS = timeMatrix.$(OBJEXT) +timeMatrix_LDADD = $(LDADD) +timeMatrix_DEPENDENCIES = libbase.la ../ldl/libldl.la \ + ../CppUnitLite/libCppUnitLite.a $(am__append_7) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libbase_la_SOURCES) testBTree.cpp testDSF.cpp \ + testDSFVector.cpp testMatrix.cpp testSPQRUtil.cpp \ + testVector.cpp timeMatrix.cpp +DIST_SOURCES = $(am__libbase_la_SOURCES_DIST) testBTree.cpp \ + testDSF.cpp testDSFVector.cpp testMatrix.cpp testSPQRUtil.cpp \ + testVector.cpp timeMatrix.cpp +am__pkginclude_HEADERS_DIST = Testable.h numericalDerivative.h Lie.h \ + Lie-inl.h BTree.h DSF.h Vector.h svdcmp.h Matrix.h SPQRUtil.h \ + DSFVector.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +boost = @boost@ +boost_serialization = @boost_serialization@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +toolbox = @toolbox@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Testing + +# Lie Groups + +# Data structures + +#---------------------------------------------------------------------------------------------------- +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +# The headers are installed in $(includedir)/gtsam: +#---------------------------------------------------------------------------------------------------- +headers = Testable.h numericalDerivative.h Lie.h Lie-inl.h BTree.h \ + DSF.h $(sources:.cpp=.h) + +# base Math +sources = Vector.cpp svdcmp.cpp Matrix.cpp $(am__append_1) \ + DSFVector.cpp +pkginclude_HEADERS = $(headers) +noinst_LTLIBRARIES = libbase.la +libbase_la_SOURCES = $(sources) +AM_CPPFLAGS = -I$(boost) $(am__append_3) $(am__append_4) \ + $(am__append_5) + +#---------------------------------------------------------------------------------------------------- +# rules to build local programs +#---------------------------------------------------------------------------------------------------- +TESTS = $(check_PROGRAMS) +AM_DEFAULT_SOURCE_EXT = .cpp +AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) $(am__append_6) \ + $(am__append_8) $(am__append_9) +LDADD = libbase.la ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a \ + $(am__append_7) +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu base/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu base/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libbase.la: $(libbase_la_OBJECTS) $(libbase_la_DEPENDENCIES) + $(CXXLINK) $(libbase_la_OBJECTS) $(libbase_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testBTree$(EXEEXT): $(testBTree_OBJECTS) $(testBTree_DEPENDENCIES) + @rm -f testBTree$(EXEEXT) + $(CXXLINK) $(testBTree_OBJECTS) $(testBTree_LDADD) $(LIBS) +testDSF$(EXEEXT): $(testDSF_OBJECTS) $(testDSF_DEPENDENCIES) + @rm -f testDSF$(EXEEXT) + $(CXXLINK) $(testDSF_OBJECTS) $(testDSF_LDADD) $(LIBS) +testDSFVector$(EXEEXT): $(testDSFVector_OBJECTS) $(testDSFVector_DEPENDENCIES) + @rm -f testDSFVector$(EXEEXT) + $(CXXLINK) $(testDSFVector_OBJECTS) $(testDSFVector_LDADD) $(LIBS) +testMatrix$(EXEEXT): $(testMatrix_OBJECTS) $(testMatrix_DEPENDENCIES) + @rm -f testMatrix$(EXEEXT) + $(CXXLINK) $(testMatrix_OBJECTS) $(testMatrix_LDADD) $(LIBS) +testSPQRUtil$(EXEEXT): $(testSPQRUtil_OBJECTS) $(testSPQRUtil_DEPENDENCIES) + @rm -f testSPQRUtil$(EXEEXT) + $(CXXLINK) $(testSPQRUtil_OBJECTS) $(testSPQRUtil_LDADD) $(LIBS) +testVector$(EXEEXT): $(testVector_OBJECTS) $(testVector_DEPENDENCIES) + @rm -f testVector$(EXEEXT) + $(CXXLINK) $(testVector_OBJECTS) $(testVector_LDADD) $(LIBS) +timeMatrix$(EXEEXT): $(timeMatrix_OBJECTS) $(timeMatrix_DEPENDENCIES) + @rm -f timeMatrix$(EXEEXT) + $(CXXLINK) $(timeMatrix_OBJECTS) $(timeMatrix_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DSFVector.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Matrix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SPQRUtil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vector.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svdcmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testBTree.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDSF.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDSFVector.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSPQRUtil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVector.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeMatrix.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgincludeHEADERS + + +# rule to run an executable +%.run: % $(LDADD) + ./$^ + +#---------------------------------------------------------------------------------------------------- + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cpp/Matrix.cpp b/base/Matrix.cpp similarity index 95% rename from cpp/Matrix.cpp rename to base/Matrix.cpp index a68d865e3..6154b609c 100644 --- a/cpp/Matrix.cpp +++ b/base/Matrix.cpp @@ -11,19 +11,16 @@ #include #ifdef GT_USE_CBLAS - #ifdef YA_BLAS -#include - #else +extern "C" { #include - #endif +} #endif #ifdef GT_USE_LAPACK - #ifdef YA_BLAS -#include - #else +extern "C" { +#include #include - #endif +} #endif #include @@ -190,7 +187,7 @@ void multiplyAdd(double alpha, const Matrix& A, const Vector& x, Vector& e) { // fill in parameters const double beta = 1.0; - const int incx = 1, incy = 1, ida = n; + const size_t incx = 1, incy = 1, ida = n; // execute blas call cblas_dgemv(CblasRowMajor, CblasNoTrans, m, n, alpha, Aptr, ida, Xptr, incx, beta, Eptr, incy); @@ -201,9 +198,9 @@ void multiplyAdd(double alpha, const Matrix& A, const Vector& x, Vector& e) { size_t m = A.size1(), n = A.size2(); double * ei = e.data().begin(); const double * aij = A.data().begin(); - for (int i = 0; i < m; i++, ei++) { + for(size_t i = 0; i < m; i++, ei++) { const double * xj = x.data().begin(); - for (int j = 0; j < n; j++, aij++, xj++) + for(size_t j = 0; j < n; j++, aij++, xj++) (*ei) += alpha * (*aij) * (*xj); } #endif @@ -218,9 +215,9 @@ void multiplyAdd(const Matrix& A, const Vector& x, Vector& e) { size_t m = A.size1(), n = A.size2(); double * ei = e.data().begin(); const double * aij = A.data().begin(); - for (int i = 0; i < m; i++, ei++) { + for(size_t i = 0; i < m; i++, ei++) { const double * xj = x.data().begin(); - for (int j = 0; j < n; j++, aij++, xj++) + for(size_t j = 0; j < n; j++, aij++, xj++) (*ei) += (*aij) * (*xj); } #endif @@ -249,7 +246,7 @@ void transposeMultiplyAdd(double alpha, const Matrix& A, const Vector& e, Vector // fill in parameters const double beta = 1.0; - const int incx = 1, incy = 1, ida = n; + const size_t incx = 1, incy = 1, ida = n; // execute blas call cblas_dgemv(CblasRowMajor, CblasTrans, m, n, alpha, Aptr, ida, Eptr, incx, beta, Xptr, incy); @@ -259,10 +256,10 @@ void transposeMultiplyAdd(double alpha, const Matrix& A, const Vector& e, Vector // TODO: use BLAS size_t m = A.size1(), n = A.size2(); double * xj = x.data().begin(); - for (int j = 0; j < n; j++,xj++) { + for(size_t j = 0; j < n; j++,xj++) { const double * ei = e.data().begin(); const double * aij = A.data().begin() + j; - for (int i = 0; i < m; i++, aij+=n, ei++) + for(size_t i = 0; i < m; i++, aij+=n, ei++) (*xj) += alpha * (*aij) * (*ei); } #endif @@ -276,10 +273,10 @@ void transposeMultiplyAdd(const Matrix& A, const Vector& e, Vector& x) { #else size_t m = A.size1(), n = A.size2(); double * xj = x.data().begin(); - for (int j = 0; j < n; j++,xj++) { + for(size_t j = 0; j < n; j++,xj++) { const double * ei = e.data().begin(); const double * aij = A.data().begin() + j; - for (int i = 0; i < m; i++, aij+=n, ei++) + for(size_t i = 0; i < m; i++, aij+=n, ei++) (*xj) += (*aij) * (*ei); } #endif @@ -397,7 +394,7 @@ void solve(Matrix& A, Matrix& B) pmatrix pm(A_.size1()); // perform LU-factorization - int res = lu_factorize(A_,pm); + size_t res = lu_factorize(A_,pm); if( res != 0 ) throw runtime_error ("Matrix::solve: lu_factorize failed!"); // backsubstitute to get the inverse @@ -462,7 +459,7 @@ pair qr(const Matrix& A) { * on a number of different matrices for which all columns change. */ /* ************************************************************************* */ -inline void householder_update_manual(Matrix &A, int j, double beta, const Vector& vjm) { +inline void householder_update_manual(Matrix &A, size_t j, double beta, const Vector& vjm) { const size_t m = A.size1(), n = A.size2(); // w = beta*transpose(A(j:m,:))*v(j:m) Vector w(n); @@ -486,7 +483,7 @@ inline void householder_update_manual(Matrix &A, int j, double beta, const Vecto } } -void householder_update(Matrix &A, int j, double beta, const Vector& vjm) { +void householder_update(Matrix &A, size_t j, double beta, const Vector& vjm) { #if defined GT_USE_CBLAS // CBLAS version not working, using manual approach @@ -551,7 +548,7 @@ void householder_update(Matrix &A, int j, double beta, const Vector& vjm) { // update A, b // A' \define A_{S}-ar and b'\define b-ad // __attribute__ ((noinline)) // uncomment to prevent inlining when profiling -inline void updateAb_manual(Matrix& A, Vector& b, int j, const Vector& a, +inline void updateAb_manual(Matrix& A, Vector& b, size_t j, const Vector& a, const Vector& r, double d) { const size_t m = A.size1(), n = A.size2(); for (size_t i = 0; i < m; i++) { // update all rows @@ -568,7 +565,7 @@ inline void updateAb_manual(Matrix& A, Vector& b, int j, const Vector& a, /** * Perform updates of system matrices */ -static void updateAb(Matrix& A, Vector& b, int j, const Vector& a, +static void updateAb(Matrix& A, Vector& b, size_t j, const Vector& a, const Vector& r, double d) { // TODO: reimplement using BLAS updateAb_manual(A,b,j,a,r,d); @@ -682,9 +679,9 @@ void householder(Matrix &A) { __CLPK_integer n = A.size2(); // convert from row major to column major - double a[m*n]; int k = 0; - for(int j=0; j thresh) ++nrANZ; @@ -972,10 +969,10 @@ Vector solve_ldl(const Matrix& M, const Vector& rhs) { Ap[N] = nrANZ; // copy in the full A matrix to compressed column form - size_t t = 0; // count the elements added - for (size_t j=0; j thresh) { Ai[t] = i; @@ -985,7 +982,7 @@ Vector solve_ldl(const Matrix& M, const Vector& rhs) { } // copy in RHS - for (size_t i = 0; i < N; ++i) + for (int i = 0; i < N; ++i) b[i] = rhs(i); // workspace variables @@ -1000,13 +997,13 @@ Vector solve_ldl(const Matrix& M, const Vector& rhs) { // factorize A into LDL' (P and Pinv not used) LDL_symbolic (N, Ap, Ai, Lp, Parent, Lnz, Flag, NULL, NULL); - size_t nrLNZ = Lp[N]; // # of nonzeros below the diagonal of L + int nrLNZ = Lp[N]; // # of nonzeros below the diagonal of L // after getting size of L, initialize storage arrays double * Lx = new double[nrLNZ]; int * Li = new int [nrLNZ]; - size_t d = LDL_numeric (N, Ap, Ai, Ax, Lp, Parent, Lnz, Li, Lx, D, Y, Pattern, + int d = LDL_numeric (N, Ap, Ai, Ax, Lp, Parent, Lnz, Li, Lx, D, Y, Pattern, Flag, NULL, NULL); if (d == N) { @@ -1138,9 +1135,9 @@ Matrix square_root_positive(const Matrix& A) { } /* ************************************************************************* */ -Matrix expm(const Matrix& A, int K) { +Matrix expm(const Matrix& A, size_t K) { Matrix E = eye(A.size1()), A_k = eye(4); - for (int k=1;k<=K;k++) { + for(size_t k=1;k<=K;k++) { A_k = A_k*A/k; E = E + A_k; } diff --git a/cpp/Matrix.h b/base/Matrix.h similarity index 98% rename from cpp/Matrix.h rename to base/Matrix.h index 4ecbe3124..ca71d5592 100644 --- a/cpp/Matrix.h +++ b/base/Matrix.h @@ -226,7 +226,7 @@ std::pair qr(const Matrix& A); /** * Imperative version of Householder rank 1 update */ -void householder_update(Matrix &A, int j, double beta, const Vector& vjm); +void householder_update(Matrix &A, size_t j, double beta, const Vector& vjm); /** * Imperative algorithm for in-place full elimination with @@ -383,7 +383,7 @@ Vector solve_ldl(const Matrix& A, const Vector& b); * @param A matrix to exponentiate * @param K number of iterations */ -Matrix expm(const Matrix& A, int K=7); +Matrix expm(const Matrix& A, size_t K=7); // macro for unit tests #define EQUALITY(expected,actual)\ diff --git a/cpp/SPQRUtil.cpp b/base/SPQRUtil.cpp similarity index 100% rename from cpp/SPQRUtil.cpp rename to base/SPQRUtil.cpp diff --git a/cpp/SPQRUtil.h b/base/SPQRUtil.h similarity index 100% rename from cpp/SPQRUtil.h rename to base/SPQRUtil.h diff --git a/cpp/Testable.h b/base/Testable.h similarity index 100% rename from cpp/Testable.h rename to base/Testable.h diff --git a/cpp/Vector.cpp b/base/Vector.cpp similarity index 100% rename from cpp/Vector.cpp rename to base/Vector.cpp diff --git a/cpp/Vector.h b/base/Vector.h similarity index 100% rename from cpp/Vector.h rename to base/Vector.h diff --git a/cpp/numericalDerivative.h b/base/numericalDerivative.h similarity index 100% rename from cpp/numericalDerivative.h rename to base/numericalDerivative.h diff --git a/cpp/svdcmp.cpp b/base/svdcmp.cpp similarity index 100% rename from cpp/svdcmp.cpp rename to base/svdcmp.cpp diff --git a/cpp/svdcmp.h b/base/svdcmp.h similarity index 100% rename from cpp/svdcmp.h rename to base/svdcmp.h diff --git a/cpp/testBTree.cpp b/base/testBTree.cpp similarity index 91% rename from cpp/testBTree.cpp rename to base/testBTree.cpp index 49a377d37..b3b7cdf16 100644 --- a/cpp/testBTree.cpp +++ b/base/testBTree.cpp @@ -12,31 +12,30 @@ using namespace boost::assign; #include -#include "Key.h" #include "BTree.h" using namespace std; using namespace gtsam; typedef pair Range; -typedef BTree RangeTree; -typedef BTree IntTree; +typedef BTree RangeTree; +typedef BTree IntTree; static std::stringstream ss; -static Symbol x1('x', 1), x2('x', 2), x3('x', 3), x4('x', 4), x5('x', 5); -typedef pair KeyInt; +static string x1("x1"), x2("x2"), x3("x3"), x4("x4"), x5("x5"); +typedef pair KeyInt; KeyInt p1(x1, 1), p2(x2, 2), p3(x3, 3), p4(x4, 4), p5(x5, 5); /* ************************************************************************* */ -int f(const Symbol& key, const Range& range) { +int f(const string& key, const Range& range) { return range.first; } -void g(const Symbol& key, int i) { +void g(const string& key, int i) { ss << (string) key; } -int add(const Symbol& k, int v, int a) { +int add(const string& k, int v, int a) { return v + a; } @@ -122,7 +121,7 @@ TEST( BTree, iterating ) LONGS_EQUAL(25,tree.fold(add,10)) // test iterator - BTree::const_iterator it = tree.begin(), it2 = tree.begin(); + BTree::const_iterator it = tree.begin(), it2 = tree.begin(); CHECK(it==it2) CHECK(*it == p1) CHECK(it->first == x1) @@ -168,7 +167,7 @@ TEST( BTree, stress ) list expected; int N = 128; for (int i = 1; i <= N; i++) { - Symbol key('a', i); + string key('a', i); Range value(i - 1, i); tree = tree.add(key, value); LONGS_EQUAL(i,tree.size()) @@ -186,7 +185,7 @@ TEST( BTree, stress ) // deconstruct the tree for (int i = N; i >= N; i--) { - Symbol key('a', i); + string key('a', i); tree = tree.remove(key); LONGS_EQUAL(i-1,tree.size()) CHECK(!tree.mem(key)) diff --git a/cpp/testDSF.cpp b/base/testDSF.cpp similarity index 97% rename from cpp/testDSF.cpp rename to base/testDSF.cpp index a0ba0be7c..ab541460c 100644 --- a/cpp/testDSF.cpp +++ b/base/testDSF.cpp @@ -13,7 +13,6 @@ using namespace boost::assign; #include #include "DSF.h" -#include "Key.h" using namespace std; using namespace gtsam; @@ -249,17 +248,16 @@ TEST(DSF, flatten) { /* ************************************************************************* */ TEST(DSF, flatten2) { - Symbol x1('x',1); - Symbol x2('x',2), x3('x',3), x4('x',4); - list keys; keys += x1,x2,x3,x4; - DSFSymbol dsf(keys); + static string x1("x1"), x2("x2"), x3("x3"), x4("x4"); + list keys; keys += x1,x2,x3,x4; + DSF dsf(keys); dsf = dsf.makeUnion(x1,x2); dsf = dsf.makeUnion(x3,x4); dsf = dsf.makeUnion(x1,x3); CHECK(dsf != dsf.flatten()); - DSFSymbol expected2; + DSF expected2; expected2 = expected2.makePair(x1, x2); expected2 = expected2.makePair(x1, x3); expected2 = expected2.makePair(x1, x4); diff --git a/cpp/testDSFVector.cpp b/base/testDSFVector.cpp similarity index 99% rename from cpp/testDSFVector.cpp rename to base/testDSFVector.cpp index 6028d8a24..4cb3c3270 100644 --- a/cpp/testDSFVector.cpp +++ b/base/testDSFVector.cpp @@ -13,7 +13,6 @@ using namespace boost::assign; #include #include "DSFVector.h" -#include "Key.h" using namespace std; using namespace gtsam; diff --git a/cpp/testMatrix.cpp b/base/testMatrix.cpp similarity index 100% rename from cpp/testMatrix.cpp rename to base/testMatrix.cpp diff --git a/cpp/testSPQRUtil.cpp b/base/testSPQRUtil.cpp similarity index 100% rename from cpp/testSPQRUtil.cpp rename to base/testSPQRUtil.cpp diff --git a/cpp/testVector.cpp b/base/testVector.cpp similarity index 100% rename from cpp/testVector.cpp rename to base/testVector.cpp diff --git a/cpp/timeMatrix.cpp b/base/timeMatrix.cpp similarity index 100% rename from cpp/timeMatrix.cpp rename to base/timeMatrix.cpp diff --git a/colamd/Makefile b/colamd/Makefile deleted file mode 100755 index 936880863..000000000 --- a/colamd/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Makefile to compile the unit test library, will end up in $(LIBDIR) - -.PHONY: all install clean - -all: libcolamd.a - -CC ?= gcc -CFLAGS += -O2 -CFLAGS += -fPIC - - -sources = $(shell ls *.c) - -library = libcolamd.a - -#Note: hack was added to ensure that flags are acutally used for compilation -# This should probably be fixed, but will work for 64 bit machines now - -$(library): colamd.o colamd_global.o ccolamd.o ccolamd_global.o - $(CC) $(CFLAGS) -c -DDLONG -o colamd_l.o colamd.c - ar crsv $@ $^ colamd_l.o - ranlib $(library) - -clean: - rm -f *.o *.*~ $(library) - -check: - echo 'no check for colamd' - -distdir: - -# Richard: added the following dependencies so that recursive make works: - -install: all - -distclean: clean - -check: all diff --git a/colamd/Makefile.am b/colamd/Makefile.am new file mode 100644 index 000000000..821cf2b49 --- /dev/null +++ b/colamd/Makefile.am @@ -0,0 +1,15 @@ +#---------------------------------------------------------------------------------------------------- +# colamd +# replaced Makefile with automake for easy linking +#---------------------------------------------------------------------------------------------------- + +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +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 + +# These are the sources for the library: +libcolamd_la_SOURCES = colamd.c colamd_global.c ccolamd.c ccolamd_global.c diff --git a/colamd/Makefile.in b/colamd/Makefile.in new file mode 100644 index 000000000..434600fe1 --- /dev/null +++ b/colamd/Makefile.in @@ -0,0 +1,541 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#---------------------------------------------------------------------------------------------------- +# colamd +# replaced Makefile with automake for easy linking +#---------------------------------------------------------------------------------------------------- + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = colamd +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libcolamd_la_LIBADD = +am_libcolamd_la_OBJECTS = colamd.lo colamd_global.lo ccolamd.lo \ + ccolamd_global.lo +libcolamd_la_OBJECTS = $(am_libcolamd_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libcolamd_la_SOURCES) +DIST_SOURCES = $(libcolamd_la_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +boost = @boost@ +boost_serialization = @boost_serialization@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +toolbox = @toolbox@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +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 + +# These are the sources for the library: +libcolamd_la_SOURCES = colamd.c colamd_global.c ccolamd.c ccolamd_global.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu colamd/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu colamd/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libcolamd.la: $(libcolamd_la_OBJECTS) $(libcolamd_la_DEPENDENCIES) + $(LINK) $(libcolamd_la_OBJECTS) $(libcolamd_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccolamd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccolamd_global.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colamd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colamd_global.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/config.h.in b/config.h.in new file mode 100644 index 000000000..023e32c2f --- /dev/null +++ b/config.h.in @@ -0,0 +1,89 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* boost serialization flag */ +#undef HAVE_BOOST_SERIALIZATION + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + +/* Define to 1 if you have the `sqrt' function. */ +#undef HAVE_SQRT + +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `unsigned int' if does not define. */ +#undef size_t diff --git a/configure.ac b/configure.ac index 2cab1163f..a24010bdf 100644 --- a/configure.ac +++ b/configure.ac @@ -4,12 +4,19 @@ AC_PREREQ(2.59) AC_INIT(gtsam, 0.0.0, dellaert@cc.gatech.edu) AM_INIT_AUTOMAKE(gtsam, 0.0.0) -AC_OUTPUT(Makefile spqr_mini/Makefile cpp/Makefile wrap/Makefile) +AC_OUTPUT(Makefile CppUnitLite/Makefile colamd/Makefile ldl/Makefile spqr_mini/Makefile base/Makefile geometry/Makefile cpp/Makefile slam/Makefile tests/Makefile wrap/Makefile) AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_SRCDIR([cpp/cal3_S2.cpp]) -AC_CONFIG_HEADER([cpp/config.h]) -AC_CONFIG_SRCDIR([wrap/wrap.cpp]) +AC_CONFIG_HEADER([config.h]) +AC_CONFIG_SRCDIR([CppUnitLite/Test.cpp]) +AC_CONFIG_SRCDIR([colamd/colamd.c]) +AC_CONFIG_SRCDIR([ldl/ldl.cpp]) AC_CONFIG_SRCDIR([spqr_mini/spqr_front.cpp]) +AC_CONFIG_SRCDIR([base/DSFVector.cpp]) +AC_CONFIG_SRCDIR([geometry/Cal3_S2.cpp]) +AC_CONFIG_SRCDIR([cpp/GaussianFactor.cpp]) +AC_CONFIG_SRCDIR([slam/pose2SLAM.cpp]) +AC_CONFIG_SRCDIR([tests/testSQP.cpp]) +AC_CONFIG_SRCDIR([wrap/wrap.cpp]) # Check for OS AC_CANONICAL_HOST # needs to be called at some point earlier @@ -52,6 +59,7 @@ AC_ARG_ENABLE([blas], *) AC_MSG_ERROR([bad value ${enableval} for --enable-blas]) ;; esac],[blas=false]) +AM_CONDITIONAL([USE_BLAS], test x$blas = xtrue) AM_CONDITIONAL([USE_BLAS_MACOS], [test x$blas = xtrue && test x$ISMAC = xtrue]) AM_CONDITIONAL([USE_BLAS_LINUX], [test x$blas = xtrue && test x$ISMAC = xfalse]) @@ -64,12 +72,14 @@ AC_ARG_ENABLE([lapack], *) AC_MSG_ERROR([bad value ${enableval} for --enable-lapack]) ;; esac],[lapack=false]) +AM_CONDITIONAL([USE_LAPACK], test x$lapack = xtrue) AM_CONDITIONAL([USE_LAPACK_MACOS], [test x$lapack = xtrue && test x$ISMAC = xtrue]) AM_CONDITIONAL([USE_LAPACK_LINUX], [test x$lapack = xtrue && test x$ISMAC = xfalse]) -AM_CONDITIONAL([USE_LAPACK], test x$lapack = xtrue) -AM_CONDITIONAL([USE_VECLIB_MACOS], [(test x$lapack = xtrue || test x$blas = xtrue) && test x$ISMAC = xtrue]) -#enabgle SparseQR for linear solving +# On Mac, we use the Accelerate framework for BLAS/LAPACK +AM_CONDITIONAL([USE_ACCELERATE_MACOS], [(test x$lapack = xtrue || test x$blas = xtrue) && test x$ISMAC = xtrue]) + +#enable SparseQR for linear solving AC_ARG_ENABLE([spqr], [ --enable-spqr Enable SparseQR library support], [case "${enableval}" in diff --git a/cpp/FactorGraph-inl.h b/cpp/FactorGraph-inl.h index fd3bd487c..21ca81f64 100644 --- a/cpp/FactorGraph-inl.h +++ b/cpp/FactorGraph-inl.h @@ -16,21 +16,17 @@ #include #include -extern "C" { -#include -#include -} - #include #include #include #include -#include +#include "ccolamd.h" #include "Ordering.h" #include "FactorGraph.h" #include "graph-inl.h" #include "DSF.h" + #define INSTANTIATE_FACTOR_GRAPH(F) \ template class FactorGraph; \ /*template boost::shared_ptr removeAndCombineFactors(FactorGraph&, const std::string&);*/ \ @@ -189,7 +185,6 @@ void colamd(int n_col, int n_row, int nrNonZeros, const map >& Ordering& ordering, const set& lastKeys) { // Convert to compressed column major format colamd wants it in (== MATLAB format!) - vector initialOrder; int Alen = ccolamd_recommended(nrNonZeros, n_row, n_col); /* colamd arg 3: size of the array A */ int * A = new int[Alen]; /* colamd arg 4: row indices of A, of size Alen */ int * p = new int[n_col + 1]; /* colamd arg 5: column pointers of A, of size n_col+1 */ @@ -200,6 +195,7 @@ void colamd(int n_col, int n_row, int nrNonZeros, const map >& int count = 0; typedef typename map >::const_iterator iterator; bool front_exists = false; + vector initialOrder; for(iterator it = columns.begin(); it != columns.end(); it++) { const Key& key = it->first; const vector& column = it->second; @@ -220,7 +216,7 @@ void colamd(int n_col, int n_row, int nrNonZeros, const map >& } double* knobs = NULL; /* colamd arg 6: parameters (uses defaults if NULL) */ - int stats[COLAMD_STATS]; /* colamd arg 7: colamd output statistics and error codes */ + int stats[CCOLAMD_STATS]; /* colamd arg 7: colamd output statistics and error codes */ // call colamd, result will be in p ************************************************* /* TODO: returns (1) if successful, (0) otherwise*/ diff --git a/cpp/ISAM2-inl.h b/cpp/ISAM2-inl.h index 59dfa06eb..3545f39bc 100644 --- a/cpp/ISAM2-inl.h +++ b/cpp/ISAM2-inl.h @@ -279,6 +279,7 @@ namespace gtsam { } + /* template void ISAM2::linear_update(const FactorGraph& newFactors) { @@ -329,8 +330,8 @@ namespace gtsam { } // Output: BayesTree(this) - } + */ template void ISAM2::fluid_relinearization(double relinearize_threshold) { diff --git a/cpp/Makefile.am b/cpp/Makefile.am index b54ae39d2..3ec302816 100644 --- a/cpp/Makefile.am +++ b/cpp/Makefile.am @@ -1,69 +1,24 @@ +#---------------------------------------------------------------------------------------------------- +# GTSAM core functionality: discrete, linear, and non-linear +#---------------------------------------------------------------------------------------------------- -# the install destination -includedir = ${prefix}/include/gtsam -libdir = ${exec_prefix}/lib +headers = +sources = +check_PROGRAMS = -# library version -current = 0 # The most recent interface number that this library implements. -revision = 0 # The implementation number of the current interface -age = 0 # The difference between the newest and oldest interfaces that \ -this library implements. In other words, the library implements all \ -the interface numbers in the range from number current - age to \ -current. +#---------------------------------------------------------------------------------------------------- +# base +#---------------------------------------------------------------------------------------------------- -# from libtool manual: -# Here are a set of rules to help you update your library version information: -# Start with version information of ‘0:0:0’ for each libtool library. -# - Update the version information only immediately before a public -# release of your software. -# - If the library source code has changed at all since the last -# update, then increment revision -# - If any interfaces have been added, removed, or changed since the -# last update, increment current, and set revision to 0. -# - If any interfaces have been added since the last public release, -# then increment age. -# - If any interfaces have been removed since the last public release, -# then set age to 0. -version = $(current):$(revision):$(age) - -# we specify the library in levels - -# basic Math -sources = Vector.cpp svdcmp.cpp Matrix.cpp SPQRUtil.cpp -check_PROGRAMS = testVector testMatrix testSPQRUtil -testVector_SOURCES = testVector.cpp -testVector_LDADD = libgtsam.la -testMatrix_SOURCES = testMatrix.cpp -testMatrix_LDADD = libgtsam.la -testSPQRUtil_SOURCES = testSPQRUtil.cpp -testSPQRUtil_LDADD = libgtsam.la - -# GTSAM basics -# The header files will be installed in ~/include/gtsam -headers = gtsam.h Value.h Testable.h Factor.h Conditional.h -headers += Ordering.h IndexTable.h numericalDerivative.h -headers += BTree.h DSF.h DSFVector.h -sources += Ordering.cpp smallExample.cpp DSFVector.cpp -check_PROGRAMS += testOrdering testBTree testDSF testDSFVector -testOrdering_SOURCES = testOrdering.cpp -testOrdering_LDADD = libgtsam.la -testBTree_SOURCES = testBTree.cpp -testBTree_LDADD = libgtsam.la -testDSF_SOURCES = testDSF.cpp -testDSF_LDADD = libgtsam.la -testDSFVector_SOURCES = testDSFVector.cpp -testDSFVector_LDADD = libgtsam.la +# GTSAM core +headers += Factor.h Conditional.h Ordering.h IndexTable.h +sources += Ordering.cpp +check_PROGRAMS += testOrdering # Symbolic Inference headers += SymbolicConditional.h sources += SymbolicFactor.cpp SymbolicFactorGraph.cpp SymbolicBayesNet.cpp check_PROGRAMS += testSymbolicFactor testSymbolicFactorGraph testSymbolicBayesNet -testSymbolicFactor_SOURCES = testSymbolicFactor.cpp -testSymbolicFactor_LDADD = libgtsam.la -testSymbolicFactorGraph_SOURCES = testSymbolicFactorGraph.cpp -testSymbolicFactorGraph_LDADD = libgtsam.la -testSymbolicBayesNet_SOURCES = testSymbolicBayesNet.cpp -testSymbolicBayesNet_LDADD = libgtsam.la # Inference headers += inference.h inference-inl.h @@ -73,231 +28,91 @@ headers += JunctionTree.h JunctionTree-inl.h headers += BayesNet.h BayesNet-inl.h headers += BayesTree.h BayesTree-inl.h headers += ISAM.h ISAM-inl.h GaussianISAM.h -headers += ISAM2.h ISAM2-inl.h GaussianISAM2.h -sources += GaussianISAM.cpp GaussianISAM2.cpp -check_PROGRAMS += testGraph testFactorGraph testJunctionTree testInference testOrdering -check_PROGRAMS += testBayesTree testISAM testGaussianISAM testGaussianISAM2 -testGraph_SOURCES = testGraph.cpp -testGraph_LDADD = libgtsam.la -testFactorGraph_SOURCES = testFactorgraph.cpp -testFactorGraph_LDADD = libgtsam.la -testJunctionTree_SOURCES = testJunctionTree.cpp -testJunctionTree_LDADD = libgtsam.la -testInference_SOURCES = testInference.cpp -testInference_LDADD = libgtsam.la -testBayesTree_SOURCES = testBayesTree.cpp -testBayesTree_LDADD = libgtsam.la -testGaussianISAM_SOURCES = testGaussianISAM.cpp -testGaussianISAM_LDADD = libgtsam.la -testGaussianISAM2_SOURCES = testGaussianISAM2.cpp -testGaussianISAM2_LDADD = libgtsam.la -testISAM_SOURCES = testISAM.cpp -testISAM_LDADD = libgtsam.la +headers += ISAM2.h ISAM2-inl.h +sources += GaussianISAM.cpp +check_PROGRAMS += testFactorGraph testJunctionTree testOrdering +check_PROGRAMS += testBayesTree testISAM + +#---------------------------------------------------------------------------------------------------- +# discrete +#---------------------------------------------------------------------------------------------------- # Binary Inference headers += BinaryConditional.h check_PROGRAMS += testBinaryBayesNet -testBinaryBayesNet_SOURCES = testBinaryBayesNet.cpp -testBinaryBayesNet_LDADD = libgtsam.la + +#---------------------------------------------------------------------------------------------------- +# linear +#---------------------------------------------------------------------------------------------------- # Gaussian inference headers += GaussianFactorSet.h SharedGaussian.h SharedDiagonal.h VectorConfig.h Factorization.h sources += NoiseModel.cpp Errors.cpp VectorMap.cpp VectorBTree.cpp GaussianFactor.cpp sources += GaussianFactorGraph.cpp GaussianConditional.cpp GaussianBayesNet.cpp -check_PROGRAMS += testVectorMap testVectorBTree testGaussianFactor testGaussianFactorGraph -check_PROGRAMS += testGaussianConditional testGaussianBayesNet testNoiseModel testErrors -testVectorMap_SOURCES = testVectorMap.cpp -testVectorMap_LDADD = libgtsam.la -testVectorBTree_SOURCES = testVectorBTree.cpp -testVectorBTree_LDADD = libgtsam.la -testGaussianFactor_SOURCES = testGaussianFactor.cpp -testGaussianFactor_LDADD = libgtsam.la -testGaussianFactorGraph_SOURCES = testGaussianFactorGraph.cpp -testGaussianFactorGraph_LDADD = libgtsam.la -testGaussianConditional_SOURCES = testGaussianConditional.cpp -testGaussianConditional_LDADD = libgtsam.la -testGaussianBayesNet_SOURCES = testGaussianBayesNet.cpp -testGaussianBayesNet_LDADD = libgtsam.la -testNoiseModel_SOURCES = testNoiseModel.cpp -testNoiseModel_LDADD = libgtsam.la -testErrors_SOURCES = testErrors.cpp -testErrors_LDADD = libgtsam.la +check_PROGRAMS += testVectorMap testVectorBTree testGaussianFactor +check_PROGRAMS += testGaussianConditional testNoiseModel testErrors # Iterative Methods headers += iterative-inl.h SubgraphSolver.h SubgraphSolver-inl.h sources += iterative.cpp BayesNetPreconditioner.cpp SubgraphPreconditioner.cpp -check_PROGRAMS += testIterative testBayesNetPreconditioner testSubgraphPreconditioner -testIterative_SOURCES = testIterative.cpp -testIterative_LDADD = libgtsam.la -testBayesNetPreconditioner_SOURCES = testBayesNetPreconditioner.cpp -testBayesNetPreconditioner_LDADD = libgtsam.la -testSubgraphPreconditioner_SOURCES = testSubgraphPreconditioner.cpp -testSubgraphPreconditioner_LDADD = libgtsam.la +check_PROGRAMS += testBayesNetPreconditioner + +# Timing tests +noinst_PROGRAMS = timeGaussianFactor timeSymbolMaps timeVectorConfig + +#---------------------------------------------------------------------------------------------------- +# nonlinear +#---------------------------------------------------------------------------------------------------- + +# Lie Groups +headers += LieConfig.h LieConfig-inl.h TupleConfig.h TupleConfig-inl.h +check_PROGRAMS += testLieConfig # Nonlinear inference headers += Key.h SymbolMap.h NonlinearFactorGraph.h NonlinearFactorGraph-inl.h headers += NonlinearOptimizer.h NonlinearOptimizer-inl.h headers += NonlinearFactor.h -check_PROGRAMS += testNonlinearFactor testNonlinearFactorGraph testNonlinearOptimizer testKey -testNonlinearFactor_SOURCES = testNonlinearFactor.cpp -testNonlinearFactor_LDADD = libgtsam.la -testNonlinearFactorGraph_SOURCES = testNonlinearFactorGraph.cpp -testNonlinearFactorGraph_LDADD = libgtsam.la -testNonlinearOptimizer_SOURCES = testNonlinearOptimizer.cpp -testNonlinearOptimizer_LDADD = libgtsam.la -testKey_SOURCES = testKey.cpp -testKey_LDADD = libgtsam.la +check_PROGRAMS += testKey # Nonlinear constraints headers += NonlinearConstraint.h NonlinearConstraint-inl.h headers += NonlinearEquality.h -check_PROGRAMS += testNonlinearConstraint testNonlinearEquality -testNonlinearConstraint_SOURCES = testNonlinearConstraint.cpp -testNonlinearConstraint_LDADD = libgtsam.la -testNonlinearEquality_SOURCES = testNonlinearEquality.cpp -testNonlinearEquality_LDADD = libgtsam.la +check_PROGRAMS += testNonlinearConstraint # SQP -headers += ConstraintOptimizer.h sources += ConstraintOptimizer.cpp -check_PROGRAMS += testSQP testConstraintOptimizer -testSQP_SOURCES = $(example) testSQP.cpp -testSQP_LDADD = libgtsam.la -testConstraintOptimizer_SOURCES = $(example) testConstraintOptimizer.cpp -testConstraintOptimizer_LDADD = libgtsam.la - -# geometry -headers += Lie.h Lie-inl.h -sources += Point2.cpp Rot2.cpp Pose2.cpp Point3.cpp Rot3.cpp Pose3.cpp Cal3_S2.cpp -check_PROGRAMS += testPoint2 testRot2 testPose2 testPoint3 testRot3 testPose3 testCal3_S2 testLieConfig testTupleConfig -testPoint2_SOURCES = testPoint2.cpp -testRot2_SOURCES = testRot2.cpp -testPose2_SOURCES = testPose2.cpp -testPoint3_SOURCES = testPoint3.cpp -testRot3_SOURCES = testRot3.cpp -testPose3_SOURCES = testPose3.cpp -testCal3_S2_SOURCES = testCal3_S2.cpp -testLieConfig_SOURCES = testLieConfig.cpp -testTupleConfig_SOURCES = testTupleConfig.cpp - -testPoint2_LDADD = libgtsam.la -testRot2_LDADD = libgtsam.la -testPose2_LDADD = libgtsam.la -testPoint3_LDADD = libgtsam.la -testRot3_LDADD = libgtsam.la -testPose3_LDADD = libgtsam.la -testCal3_S2_LDADD = libgtsam.la -testLieConfig_LDADD = libgtsam.la -testTupleConfig_LDADD = libgtsam.la - -# simulated2D example -headers += simulated2D.h simulated2DOriented.h -headers += Simulated2DConfig.h Simulated2DOrientedConfig.h -headers += Simulated2DPosePrior.h Simulated2DPointPrior.h Simulated2DOrientedPosePrior.h -headers += Simulated2DOdometry.h Simulated2DMeasurement.h Simulated2DOrientedOdometry.h -sources += simulated2D.cpp simulated2DOriented.cpp -testSimulated2D_SOURCES = testSimulated2D.cpp -testSimulated2D_LDADD = libgtsam.la -testSimulated2DOriented_SOURCES = testSimulated2DOriented.cpp -testSimulated2DOriented_LDADD = libgtsam.la -check_PROGRAMS += testSimulated2D testSimulated2DOriented - -# simulated3D example -sources += Simulated3D.cpp -testSimulated3D_SOURCES = testSimulated3D.cpp -testSimulated3D_LDADD = libgtsam.la -check_PROGRAMS += testSimulated3D - -# Pose SLAM headers -headers += BetweenFactor.h PriorFactor.h -headers += LieConfig.h LieConfig-inl.h TupleConfig.h TupleConfig-inl.h - -# 2D Pose SLAM -headers += -sources += pose2SLAM.cpp Pose2SLAMOptimizer.cpp dataset.cpp -check_PROGRAMS += testPose2Factor testPose2Config testPose2SLAM testPose2Prior -testPose2Prior_SOURCES = testPose2Prior.cpp -testPose2Prior_LDADD = libgtsam.la -testPose2Factor_SOURCES = testPose2Factor.cpp -testPose2Factor_LDADD = libgtsam.la -testPose2Config_SOURCES = testPose2Config.cpp -testPose2Config_LDADD = libgtsam.la -testPose2SLAM_SOURCES = testPose2SLAM.cpp -testPose2SLAM_LDADD = libgtsam.la - -# 2D SLAM using Bearing and Range -headers += BearingFactor.h RangeFactor.h BearingRangeFactor.h -sources += planarSLAM.cpp -check_PROGRAMS += testPlanarSLAM -testPlanarSLAM_SOURCES = testPlanarSLAM.cpp -testPlanarSLAM_LDADD = libgtsam.la - -# 3D Pose constraints -headers += -sources += pose3SLAM.cpp -check_PROGRAMS += testPose3Factor testPose3Config testPose3SLAM -testPose3Factor_SOURCES = testPose3Factor.cpp -testPose3Factor_LDADD = libgtsam.la -testPose3Config_SOURCES = testPose3Config.cpp -testPose3Config_LDADD = libgtsam.la -testPose3SLAM_SOURCES = testPose3SLAM.cpp -testPose3SLAM_LDADD = libgtsam.la - -# Cameras -sources += CalibratedCamera.cpp SimpleCamera.cpp -check_PROGRAMS += testCalibratedCamera testSimpleCamera -testCalibratedCamera_SOURCES = testCalibratedCamera.cpp -testCalibratedCamera_LDADD = libgtsam.la -testSimpleCamera_SOURCES = testSimpleCamera.cpp -testSimpleCamera_LDADD = libgtsam.la - -# Tensors -headers += tensors.h Tensor1.h Tensor2.h Tensor3.h Tensor4.h Tensor5.h -headers += Tensor1Expression.h Tensor2Expression.h Tensor3Expression.h Tensor5Expression.h -headers += projectiveGeometry.h tensorInterface.h -sources += projectiveGeometry.cpp tensorInterface.cpp -check_PROGRAMS += testTensors testHomography2 testTrifocal -testHomography2_SOURCES = testHomography2.cpp -testHomography2_LDADD = libgtsam.la -testTensors_SOURCES = testTensors.cpp -testTensors_LDADD = libgtsam.la -testTrifocal_SOURCES = testTrifocal.cpp -testTrifocal_LDADD = libgtsam.la - -# Visual SLAM -sources += visualSLAM.cpp -check_PROGRAMS += testVSLAMFactor testVSLAMGraph testVSLAMConfig -testVSLAMFactor_SOURCES = testVSLAMFactor.cpp -testVSLAMFactor_LDADD = libgtsam.la -testVSLAMGraph_SOURCES = testVSLAMGraph.cpp -testVSLAMGraph_LDADD = libgtsam.la -testVSLAMConfig_SOURCES = testVSLAMConfig.cpp -testVSLAMConfig_LDADD = libgtsam.la +check_PROGRAMS += testConstraintOptimizer +#---------------------------------------------------------------------------------------------------- +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +# The headers are installed in $(includedir)/gtsam: +#---------------------------------------------------------------------------------------------------- headers += $(sources:.cpp=.h) +pkginclude_HEADERS = $(headers) +noinst_HEADERS = gtsam.h +noinst_LTLIBRARIES = libcpp.la +libcpp_la_SOURCES = $(sources) +AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -# Timing tests -noinst_PROGRAMS = timeGaussianFactor timeGaussianFactorGraph timeRot3 timeMatrix timeSymbolMaps timeVectorConfig -timeRot3_SOURCES = timeRot3.cpp -timeRot3_LDADD = libgtsam.la -timeGaussianFactor_SOURCES = timeGaussianFactor.cpp -timeGaussianFactor_LDADD = libgtsam.la -timeGaussianFactorGraph_SOURCES = timeGaussianFactorGraph.cpp -timeGaussianFactorGraph_LDADD = libgtsam.la -timeMatrix_SOURCES = timeMatrix.cpp -timeMatrix_LDADD = libgtsam.la -timeSymbolMaps_SOURCES = timeSymbolMaps.cpp -timeSymbolMaps_LDADD = libgtsam.la -timeVectorConfig_SOURCES = timeVectorConfig.cpp -timeVectorConfig_LDADD = libgtsam.la +#---------------------------------------------------------------------------------------------------- +# rules to build local programs +#---------------------------------------------------------------------------------------------------- +TESTS = $(check_PROGRAMS) +AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) +LDADD = libcpp.la ../base/libbase.la +LDADD += ../CppUnitLite/libCppUnitLite.a ../colamd/libcolamd.la ../ldl/libldl.la +AM_DEFAULT_SOURCE_EXT = .cpp -# create both dynamic and static libraries -AM_CXXFLAGS = -I$(boost) -fPIC -AM_LDFLAGS = -lib_LTLIBRARIES = libgtsam.la -libgtsam_la_SOURCES = $(sources) -libgtsam_la_CPPFLAGS = $(AM_CXXFLAGS) -libgtsam_la_LDFLAGS = -version-info $(version) -L../colamd -lcolamd -L../ldl -lldl +# rule to run an executable +%.run: % $(LDADD) + ./$^ + +#---------------------------------------------------------------------------------------------------- +# OLD, need to figure where these go! +#---------------------------------------------------------------------------------------------------- + +AM_CXXFLAGS = # enable debug if --enable-debug is set in configure if DEBUG @@ -306,56 +121,11 @@ endif if USE_PROFILING AM_CXXFLAGS += -pg -libgtsam_la_CPPFLAGS += -pg AM_LDFLAGS += -pg -libgtsam_la_LDFLAGS += -pg -endif - -# install the header files -include_HEADERS = $(headers) - -AM_CXXFLAGS += -I.. -AM_LDFLAGS += -L../CppUnitLite -lCppUnitLite $(BOOST_LDFLAGS) $(boost_serialization) - -# adding cblas implementation - split into a default linux version using the -# autotools script, and a mac version that is hardcoded -# NOTE: the GT_USE_CBLAS is just used as a means of detecting when blas is available -if USE_BLAS_LINUX -AM_CXXFLAGS += -DGT_USE_CBLAS -libgtsam_la_CPPFLAGS += -DGT_USE_CBLAS -AM_LDFLAGS += -lcblas -latlas # If getting from script: $(BLAS_LIBS) $(LIBS) $(FLIBS) -libgtsam_la_LDFLAGS += -lcblas -latlas # $(BLAS_LIBS) $(LIBS) $(FLIBS) -endif - -if USE_BLAS_MACOS -AM_CXXFLAGS += -DGT_USE_CBLAS -endif - -if USE_LAPACK_LINUX -AM_CXXFLAGS += -I/usr/include -AM_LDFLAGS += -llapack -libgtsam_la_LDFLAGS += -llapack endif if USE_LAPACK -AM_LDFLAGS += -L../spqr_mini -lspqr_mini -libgtsam_la_LDFLAGS += -L../spqr_mini -lspqr_mini AM_CXXFLAGS += -DGT_USE_LAPACK +LDADD += ../spqr_mini/libspqr_mini.la endif -if USE_VECLIB_MACOS -AM_CXXFLAGS += -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT -I/System/Library/Frameworks/vecLib.framework/Headers -libgtsam_la_CPPFLAGS += -DGT_USE_CBLAS -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT -I/System/Library/Frameworks/vecLib.framework/Headers -AM_LDFLAGS += -lcblas -latlas -libgtsam_la_LDFLAGS += -framework vecLib -lcblas -latlas -endif - -TESTS = $(check_PROGRAMS) -CXXLINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ - $(CXXLD) -g $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ # CXXLINK is only used for unit tests - -# rule to run an executable -%.run: % libgtsam.la - ./$^ - diff --git a/cpp/SymbolicFactorGraph.cpp b/cpp/SymbolicFactorGraph.cpp index 95ae38ddc..fda4df893 100644 --- a/cpp/SymbolicFactorGraph.cpp +++ b/cpp/SymbolicFactorGraph.cpp @@ -9,7 +9,6 @@ #include #include #include -#include "Point2.h" #include "Ordering.h" #include "SymbolicFactorGraph.h" #include "SymbolicBayesNet.h" @@ -20,8 +19,6 @@ using namespace std; namespace gtsam { - INSTANTIATE_LIE_CONFIG(Symbol, Point2) - // Explicitly instantiate so we don't have to include everywhere template class FactorGraph; @@ -52,39 +49,5 @@ namespace gtsam { return eliminate(ordering); } - /* ************************************************************************* */ - void saveGraph(const SymbolicFactorGraph& fg, const SymbolicConfig& config, const std::string& s) { - - Symbol key; - Point2 pt; - float scale = 100; - - string dotfile = s + ".dot"; - ofstream of(dotfile.c_str()); - of << "graph G{" << endl; - of << "bgcolor=\"transparent\";" << endl; - - BOOST_FOREACH(boost::tie(key, pt), config){ - of << (string)key << "[label=\"" << (string)key << "\"][pos=\"" << pt.x()*scale << "," << pt.y()*scale << "\"];" << endl; - } - - int index = 0; - BOOST_FOREACH(const SymbolicFactorGraph::sharedFactor& factor, fg) { - index++; - Point2 center; - BOOST_FOREACH(const Symbol& key, factor->keys()) - center = center + config[key]; - center = Point2(center.x() / factor->keys().size(), center.y() / factor->keys().size()); - of << "f" << index << "[pos=\"" << center.x()*scale << "," << center.y()*scale << "\"][shape=\"point\"];" << endl; - BOOST_FOREACH(const Symbol& key, factor->keys()) - of << "f" << index << "--" << (string)key << endl; - } - of<<"}"; - of.close(); - - string cmd = boost::str(boost::format("neato -s -n -Tpdf %s -o %s.pdf") % dotfile % s); - system(cmd.c_str()); - } - /* ************************************************************************* */ } diff --git a/cpp/SymbolicFactorGraph.h b/cpp/SymbolicFactorGraph.h index addf48de3..5cb3457e2 100644 --- a/cpp/SymbolicFactorGraph.h +++ b/cpp/SymbolicFactorGraph.h @@ -5,8 +5,7 @@ * Author: Frank Dellaert */ -#ifndef SYMBOLICFACTORGRAPH_H_ -#define SYMBOLICFACTORGRAPH_H_ +#pragma once #include #include @@ -18,10 +17,6 @@ namespace gtsam { - class Point2; - - typedef LieConfig SymbolicConfig; - class SymbolicConditional; /** Symbolic Factor Graph */ @@ -87,8 +82,4 @@ namespace gtsam { SymbolicBayesNet eliminateFrontals(const Ordering& ordering); }; - // save graph to the graphviz format - void saveGraph(const SymbolicFactorGraph& fg, const SymbolicConfig& config, const std::string& s); -} - -#endif /* SYMBOLICFACTORGRAPH_H_ */ +} // namespace gtsam diff --git a/cpp/Value.h b/cpp/Value.h deleted file mode 100644 index a6288755d..000000000 --- a/cpp/Value.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @file Value.h - * @brief Abstract base class for values that can be updated using exmap - * @author Frank Dellaert - */ - -// \callgraph - -#pragma once - -#include "Vector.h" -#include "Testable.h" - -namespace gtsam { - - /** - * The value class should be templated with the derived class, e.g. - * class Rot3 : public Value. This allows us to define the - * return type of exmap as a Rot3 as well. - */ - template class Value : public Testable { - - private: - - const size_t dim_; // dimensionality of tangent space, e.g. 3 for Rot3 - - public: - - Value(size_t dim) : dim_ (dim) {} - - /** - * dimensionality of tangent space, e.g. 3 for Rot3 - */ - size_t dim() { return dim_;} - - /** - * Exponential map: add a delta vector, addition for most simple - * types, but fully exponential map for types such as Rot3, which - * takes a 3-dim delta vector to update a 9-dim representation. - * equality up to tolerance - */ - virtual Derived exmap(const Vector& delta) const = 0; - }; -} diff --git a/cpp/graph-inl.h b/cpp/graph-inl.h index 54471e0ec..cd57185b7 100644 --- a/cpp/graph-inl.h +++ b/cpp/graph-inl.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include diff --git a/cpp/gtsam.sln b/cpp/gtsam.sln deleted file mode 100644 index a2912451c..000000000 --- a/cpp/gtsam.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtsam", "gtsam.vcproj", "{8AC1F57D-77D6-4B79-B50C-2508F076EBA3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8AC1F57D-77D6-4B79-B50C-2508F076EBA3}.Debug|Win32.ActiveCfg = Debug|Win32 - {8AC1F57D-77D6-4B79-B50C-2508F076EBA3}.Debug|Win32.Build.0 = Debug|Win32 - {8AC1F57D-77D6-4B79-B50C-2508F076EBA3}.Release|Win32.ActiveCfg = Release|Win32 - {8AC1F57D-77D6-4B79-B50C-2508F076EBA3}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/cpp/gtsam.vcproj b/cpp/gtsam.vcproj deleted file mode 100644 index ec6d32a5a..000000000 --- a/cpp/gtsam.vcproj +++ /dev/null @@ -1,362 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cpp/manual.mk b/cpp/manual.mk deleted file mode 100644 index 1092b1827..000000000 --- a/cpp/manual.mk +++ /dev/null @@ -1,139 +0,0 @@ -# Makefile for gtsam/cpp -# Author Frank Dellaert - -# on the Mac, libtool is called glibtool :-( -# documentation see /opt/local/share/doc/libtool-1.5.26/manual.html -ifeq ($(shell uname),Darwin) - LIBTOOL = glibtool -else - LIBTOOL = libtool -endif - -INSTALL = install - -# C++ flags -CXXFLAGS += -isystem $(BOOST_DIR) -O5 -CXXFLAGS += -DBOOST_UBLAS_NDEBUG - -# specify the source files -# basic -sources = Vector.cpp svdcmp.cpp Matrix.cpp numericalDerivative.cpp Ordering.cpp -# nodes -sources += FGConfig.cpp GaussianFactor.cpp ConditionalGaussian.cpp NonlinearFactor.cpp -# graphs -sources += FactorGraph.cpp GaussianFactorGraph.cpp NonlinearFactorGraph.cpp ChordalBayesNet.cpp -# geometry -sources += Point2.cpp Point3.cpp Rot3.cpp Pose3.cpp Cal3_S2.cpp - -# The header files will be installed in ~/include/gtsam -headers = Value.h factor.h linearfactorset.h $(sources:.cpp=.h) - -# conventional object files -object_files = $(sources:.cpp=.o) - -# For libtool to build a shared library, we need "shared" object files with extension .lo -shared_object_files = $(sources:.cpp=.lo) - -# rule for shared compiling shared_object_files -%.lo: %.o - -# rule for shared compiling shared_object_files -%.lo: %.cpp - $(LIBTOOL) --tag=CXX --mode=compile $(COMPILE.cpp) $(OUTPUT_OPTION) $< - -# library version -current = 0 # The most recent interface number that this library implements. -revision = 0 # The implementation number of the current interface -age = 0 # The difference between the newest and oldest interfaces that \ -this library implements. In other words, the library implements all \ -the interface numbers in the range from number current - age to \ -current. -# from libtool manual: -# Here are a set of rules to help you update your library version information: -# Start with version information of ‘0:0:0’ for each libtool library. -# Update the version information only immediately before a public release of your software. -# If the library source code has changed at all since the last update, then increment revision -# If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0. -# If any interfaces have been added since the last public release, then increment age. -# If any interfaces have been removed since the last public release, then set age to 0. -version = $(current):$(revision):$(age) - -# this builds the shared library -# note that libgtsam.la is the libtool target -# the actual library is built in the hidden subdirectory .libs -libgtsam.la : $(shared_object_files) - $(LIBTOOL) --tag=CXX --mode=link g++ -version-info $(version) -o libgtsam.la -rpath $(HOME)/lib $(shared_object_files) - -# shortcut -lib: libgtsam.la - -# this builds the static library (used for unit testing) -# object files will be only ones remade if a file is touched because deps broken -libgtsam.a : $(shared_object_files) $(object_files) - $(LIBTOOL) --tag=CXX --mode=link g++ -o libgtsam.a -static $(HOME)/lib $(shared_object_files) - -# and this installs the shared library -install: libgtsam.la - $(INSTALL) -d $(HOME)/include/gtsam - rm -f $(HOME)/include/gtsam/typedefs.h - cp -f $(headers) $(HOME)/include/gtsam - $(LIBTOOL) --mode=install cp libgtsam.la $(HOME)/lib/libgtsam.la - -# create the MATLAB toolbox -interfacePath = . -moduleName = gtsam -toolboxpath = $(HOME)/toolbox/gtsam -mexFlags = "-I$(BOOST_DIR) -I$(HOME)/include -I$(HOME)/include/gtsam -L$(HOME)/lib -lgtsam" -matlab: - wrap $(interfacePath) $(moduleName) $(toolboxpath) $(mexFlags) - -# unit tests -unit-tests = $(shell ls test*.cpp) -unit-tests: $(unit-tests:.cpp=.run) - -# timing tests -timing-tests = $(shell ls time*.cpp) -timing-tests: $(timing-tests:.cpp=.run) - -# local executables are for testing and timing -executables = $(unit-tests:.cpp=) $(timing-tests:.cpp=) - -# link flags -INCDIR ?= $(HOME)/include -LIBDIR ?= $(HOME)/lib -$(executables) : simulated2D.o smallExample.o libgtsam.a -$(executables) : LDFLAGS += -I. -I$(INCDIR) -$(executables) : LDLIBS += libgtsam.a -L$(LIBDIR) -lCppUnitLite - -tests: unit-tests timing-tests -clean-tests: - -rm -rf $(executables) - -# make a version of timeGaussianFactor instrumented for Saturn profiler -saturn: timeGaussianFactor -saturn: CXXFLAGS += -finstrument-functions -saturn: LDLIBS += -lSaturn - -# rule to run an executable -%.run: % - ./$^ - -# clean will remove the hidden .libs directory by libtool as well -clean: clean-tests - -rm -rf *.d *.o *.lo *.a *.la .libs *.dSYM - -.PHONY: clean clean-tests unit-tests timing-tests matlab deps - -# dependecy generation as described in -# http://www.wlug.org.nz/MakefileHowto -all-sources = $(sources) smallExample.cpp simulated2D.cpp - -# when building object files, -MMD specifies dependency generation into .d files -(all-sources:.cpp=.o): CXXFLAGS += -MMD - -deps := $(all-sources:.cpp=.d) -deps: $(all-sources) - $(CXX) -MMD -E $(CXXFLAGS) -I. -I$(INCDIR) $(all-sources) > /dev/null - --include $(deps) - diff --git a/cpp/testBayesNetPreconditioner.cpp b/cpp/testBayesNetPreconditioner.cpp index abac336bb..f9cc79613 100644 --- a/cpp/testBayesNetPreconditioner.cpp +++ b/cpp/testBayesNetPreconditioner.cpp @@ -11,13 +11,11 @@ #define GTSAM_MAGIC_KEY #include "Ordering.h" -#include "smallExample.h" #include "BayesNetPreconditioner.h" #include "iterative-inl.h" using namespace std; using namespace gtsam; -using namespace example; /* ************************************************************************* */ TEST( BayesNetPreconditioner, operators ) @@ -62,68 +60,6 @@ TEST( BayesNetPreconditioner, operators ) CHECK(assert_equal(expected2,actual2)); } -/* ************************************************************************* */ -TEST( BayesNetPreconditioner, conjugateGradients ) -{ - // Build a planar graph - GaussianFactorGraph Ab; - VectorConfig xtrue; - size_t N = 3; - boost::tie(Ab, xtrue) = planarGraph(N); // A*x-b - - // Get the spanning tree and corresponding ordering - GaussianFactorGraph Ab1, Ab2; // A1*x-b1 and A2*x-b2 - boost::tie(Ab1, Ab2) = splitOffPlanarTree(N, Ab); - - // Eliminate the spanning tree to build a prior - Ordering ordering = planarOrdering(N); - GaussianBayesNet Rc1 = Ab1.eliminate(ordering); // R1*x-c1 - VectorConfig xbar = optimize(Rc1); // xbar = inv(R1)*c1 - - // Create BayesNet-preconditioned system - BayesNetPreconditioner system(Ab,Rc1); - - // Create zero config y0 and perturbed config y1 - VectorConfig y0; - Vector z2 = zero(2); - BOOST_FOREACH(const Symbol& j, ordering) y0.insert(j,z2); - - VectorConfig y1 = y0; - y1["x2003"] = Vector_(2, 1.0, -1.0); - VectorConfig x1 = system.x(y1); - - // Check gradient for y0 - VectorConfig expectedGradient0; - expectedGradient0.insert("x1001", Vector_(2,-1000.,-1000.)); - expectedGradient0.insert("x1002", Vector_(2, 0., -300.)); - expectedGradient0.insert("x1003", Vector_(2, 0., -300.)); - expectedGradient0.insert("x2001", Vector_(2, -100., 200.)); - expectedGradient0.insert("x2002", Vector_(2, -100., 0.)); - expectedGradient0.insert("x2003", Vector_(2, -100., -200.)); - expectedGradient0.insert("x3001", Vector_(2, -100., 100.)); - expectedGradient0.insert("x3002", Vector_(2, -100., 0.)); - expectedGradient0.insert("x3003", Vector_(2, -100., -100.)); - VectorConfig actualGradient0 = system.gradient(y0); - CHECK(assert_equal(expectedGradient0,actualGradient0)); -#ifdef VECTORBTREE - CHECK(actualGradient0.cloned(y0)); -#endif - - // Solve using PCG - bool verbose = false; - double epsilon = 1e-6; // had to crank this down !!! - size_t maxIterations = 100; - VectorConfig actual_y = gtsam::conjugateGradients(system, y1, verbose, epsilon, epsilon, maxIterations); - VectorConfig actual_x = system.x(actual_y); - CHECK(assert_equal(xtrue,actual_x)); - - // Compare with non preconditioned version: - VectorConfig actual2 = conjugateGradientDescent(Ab, x1, verbose, epsilon, - maxIterations); - CHECK(assert_equal(xtrue,actual2)); -} - /* ************************************************************************* */ int main() { TestResult tr; diff --git a/cpp/testBayesTree.cpp b/cpp/testBayesTree.cpp index 9c727f49e..a101d6acc 100644 --- a/cpp/testBayesTree.cpp +++ b/cpp/testBayesTree.cpp @@ -15,7 +15,6 @@ using namespace boost::assign; #include "SymbolicFactorGraph.h" #include "Ordering.h" #include "BayesTree-inl.h" -#include "smallExample.h" #include "IndexTable.h" using namespace gtsam; diff --git a/cpp/testBinaryBayesNet.cpp b/cpp/testBinaryBayesNet.cpp index 5aeaba1a7..b51e4a763 100644 --- a/cpp/testBinaryBayesNet.cpp +++ b/cpp/testBinaryBayesNet.cpp @@ -24,7 +24,6 @@ using namespace boost::assign; #include "BinaryConditional.h" #include "BayesNet-inl.h" -#include "smallExample.h" #include "Ordering.h" #include "SymbolMap.h" diff --git a/cpp/testConstraintOptimizer.cpp b/cpp/testConstraintOptimizer.cpp index f0fdd5d75..de29cf0b4 100644 --- a/cpp/testConstraintOptimizer.cpp +++ b/cpp/testConstraintOptimizer.cpp @@ -14,7 +14,6 @@ #include #include -#include #define GTSAM_MAGIC_KEY @@ -23,7 +22,6 @@ using namespace boost::assign; using namespace std; using namespace gtsam; -using namespace example; /* ************************************************************************* */ // Example of a single Constrained QP problem from the matlab testCQP.m file. @@ -382,83 +380,6 @@ TEST( matrix, line_search ) { CHECK(final_error <= init_error); } -/* ************************************************************************* */ -TEST( matrix, unconstrained_fg_ata ) { - // create a graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - Matrix A; Vector b; - Ordering ordering; - ordering += Symbol('l', 1), Symbol('x', 1), Symbol('x', 2); - boost::tie(A, b) = fg.matrix(ordering); - Matrix B_ata = prod(trans(A), A); - - // solve subproblem - Vector actual = solve_ldl(B_ata, prod(trans(A), b)); - - // verify - Vector expected = createCorrectDelta().vector(); - CHECK(assert_equal(expected,actual)); -} - - -///* ************************************************************************* */ -//TEST( matrix, unconstrained_fg ) { -// // create a graph -// GaussianFactorGraph fg = createGaussianFactorGraph(); -// -// Matrix A; Vector b; -// Ordering ordering; -// ordering += Symbol('l', 1), Symbol('x', 1), Symbol('x', 2); -// boost::tie(A, b) = fg.matrix(ordering); -// Matrix B_ata = prod(trans(A), A); -//// print(B_ata, "B_ata"); -//// print(b, " b"); -// -// // parameters -// size_t maxIt = 50; -// double stepsize = 0.1; -// -// // iterate to solve -// VectorConfig x = createZeroDelta(); -// BFGSEstimator B(x.dim()); -// -// Vector step; -// -// for (size_t i=0; i0) { -// B.update(dfx, step); -// } else { -// B.update(dfx); -// } -// -// // solve subproblem -//// print(B.getB(), " B_bfgs"); -// Vector delta = solve_ldl(B.getB(), -dfx); -//// Vector delta = solve_ldl(B_ata, -dfx); -// -//// print(delta, " delta"); -// -// // update -// step = stepsize * delta; -//// step = linesearch(x, delta, penalty); // TODO: switch here -// x = expmap(x, step); -//// print(step, " step"); -// } -// -// // verify -// VectorConfig expected = createCorrectDelta(); -// CHECK(assert_equal(expected,x, 1e-4)); -//} - /* ************************************************************************* */ int main() { TestResult tr; return TestRegistry::runAllTests(tr); } /* ************************************************************************* */ diff --git a/cpp/testGaussianFactor.cpp b/cpp/testGaussianFactor.cpp index 58d530f21..8d956d0b0 100644 --- a/cpp/testGaussianFactor.cpp +++ b/cpp/testGaussianFactor.cpp @@ -21,11 +21,9 @@ using namespace boost::assign; #include "Ordering.h" #include "GaussianConditional.h" #include "inference-inl.h" -#include "smallExample.h" using namespace std; using namespace gtsam; -using namespace example; using namespace boost; static SharedDiagonal @@ -33,22 +31,6 @@ static SharedDiagonal constraintModel = noiseModel::Constrained::All(2); /* ************************************************************************* */ -TEST( GaussianFactor, linearFactor ) -{ - Matrix I = eye(2); - Vector b = Vector_(2, 2.0, -1.0); - GaussianFactor expected("x1", -10*I,"x2", 10*I, b, noiseModel::Unit::Create(2)); - - // create a small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // get the factor "f2" from the factor graph - GaussianFactor::shared_ptr lf = fg[1]; - - // check if the two factors are the same - CHECK(assert_equal(expected,*lf)); -} - TEST( GaussianFactor, constructor) { Vector b = Vector_(3, 1., 2., 3.); @@ -92,101 +74,6 @@ TEST( GaussianFactor, operators ) CHECK(assert_equal(expectedX2,x)); } -/* ************************************************************************* */ -TEST( GaussianFactor, keys ) -{ - // get the factor "f2" from the small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - GaussianFactor::shared_ptr lf = fg[1]; - list expected; - expected.push_back("x1"); - expected.push_back("x2"); - CHECK(lf->keys() == expected); -} - -/* ************************************************************************* */ -TEST( GaussianFactor, dimensions ) -{ - // get the factor "f2" from the small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // Check a single factor - Dimensions expected; - insert(expected)("x1", 2)("x2", 2); - Dimensions actual = fg[1]->dimensions(); - CHECK(expected==actual); -} - -/* ************************************************************************* */ -TEST( GaussianFactor, getDim ) -{ - // get a factor - GaussianFactorGraph fg = createGaussianFactorGraph(); - GaussianFactor::shared_ptr factor = fg[0]; - - // get the size of a variable - size_t actual = factor->getDim("x1"); - - // verify - size_t expected = 2; - CHECK(actual == expected); -} - -/* ************************************************************************* */ -TEST( GaussianFactor, combine ) -{ - // create a small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // get two factors from it and insert the factors into a vector - vector lfg; - lfg.push_back(fg[4 - 1]); - lfg.push_back(fg[2 - 1]); - - // combine in a factor - GaussianFactor combined(lfg); - - // sigmas - double sigma2 = 0.1; - double sigma4 = 0.2; - Vector sigmas = Vector_(4, sigma4, sigma4, sigma2, sigma2); - - // the expected combined linear factor - Matrix Ax2 = Matrix_(4, 2, // x2 - -5., 0., - +0., -5., - 10., 0., - +0., 10.); - - Matrix Al1 = Matrix_(4, 2, // l1 - 5., 0., - 0., 5., - 0., 0., - 0., 0.); - - Matrix Ax1 = Matrix_(4, 2, // x1 - 0.00, 0., // f4 - 0.00, 0., // f4 - -10., 0., // f2 - 0.00, -10. // f2 - ); - - // the RHS - Vector b2(4); - b2(0) = -1.0; - b2(1) = 1.5; - b2(2) = 2.0; - b2(3) = -1.0; - - // use general constructor for making arbitrary factors - vector > meas; - meas.push_back(make_pair("x2", Ax2)); - meas.push_back(make_pair("l1", Al1)); - meas.push_back(make_pair("x1", Ax1)); - GaussianFactor expected(meas, b2, noiseModel::Diagonal::Sigmas(ones(4))); - CHECK(assert_equal(expected,combined)); -} - /* ************************************************************************* */ TEST( NonlinearFactorGraph, combine2){ double sigma1 = 0.0957; @@ -304,65 +191,6 @@ TEST( GaussianFactor, linearFactorN){ CHECK(assert_equal(expected,combinedFactor)); } -/* ************************************************************************* */ -TEST( GaussianFactor, error ) -{ - // create a small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // get the first factor from the factor graph - GaussianFactor::shared_ptr lf = fg[0]; - - // check the error of the first factor with noisy config - VectorConfig cfg = createZeroDelta(); - - // calculate the error from the factor "f1" - // note the error is the same as in testNonlinearFactor - double actual = lf->error(cfg); - DOUBLES_EQUAL( 1.0, actual, 0.00000001 ); -} - -/* ************************************************************************* */ -TEST( GaussianFactor, eliminate ) -{ - // create a small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // get two factors from it and insert the factors into a vector - vector lfg; - lfg.push_back(fg[4 - 1]); - lfg.push_back(fg[2 - 1]); - - // combine in a factor - GaussianFactor combined(lfg); - - // eliminate the combined factor - GaussianConditional::shared_ptr actualCG; - GaussianFactor::shared_ptr actualLF; - boost::tie(actualCG,actualLF) = combined.eliminate("x2"); - - // create expected Conditional Gaussian - Matrix I = eye(2)*sqrt(125.0); - Matrix R11 = I, S12 = -0.2*I, S13 = -0.8*I; - Vector d = I*Vector_(2,0.2,-0.14); - - // Check the conditional Gaussian - GaussianConditional - expectedCG("x2", d, R11, "l1", S12, "x1", S13, repeat(2, 1.0)); - - // the expected linear factor - I = eye(2)/0.2236; - Matrix Bl1 = I, Bx1 = -I; - Vector b1 = I*Vector_(2,0.0,0.2); - - GaussianFactor expectedLF("l1", Bl1, "x1", Bx1, b1, repeat(2,1.0)); - - // check if the result matches - CHECK(assert_equal(expectedCG,*actualCG,1e-3)); - CHECK(assert_equal(expectedLF,*actualLF,1e-3)); -} - - /* ************************************************************************* */ TEST( GaussianFactor, eliminate2 ) { @@ -470,96 +298,6 @@ TEST( GaussianFactor, empty ) CHECK(f.empty()==true); } -/* ************************************************************************* */ -TEST( GaussianFactor, matrix ) -{ - // create a small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // get the factor "f2" from the factor graph - //GaussianFactor::shared_ptr lf = fg[1]; // NOTE: using the older version - Vector b2 = Vector_(2, 0.2, -0.1); - Matrix I = eye(2); - GaussianFactor::shared_ptr lf(new GaussianFactor("x1", -I, "x2", I, b2, sigma0_1)); - - // render with a given ordering - Ordering ord; - ord += "x1","x2"; - - // Test whitened version - Matrix A_act1; Vector b_act1; - boost::tie(A_act1,b_act1) = lf->matrix(ord, true); - - Matrix A1 = Matrix_(2,4, - -10.0, 0.0, 10.0, 0.0, - 000.0,-10.0, 0.0, 10.0 ); - Vector b1 = Vector_(2, 2.0, -1.0); - - EQUALITY(A_act1,A1); - EQUALITY(b_act1,b1); - - // Test unwhitened version - Matrix A_act2; Vector b_act2; - boost::tie(A_act2,b_act2) = lf->matrix(ord, false); - - - Matrix A2 = Matrix_(2,4, - -1.0, 0.0, 1.0, 0.0, - 000.0,-1.0, 0.0, 1.0 ); - //Vector b2 = Vector_(2, 2.0, -1.0); - - EQUALITY(A_act2,A2); - EQUALITY(b_act2,b2); - - // Ensure that whitening is consistent - shared_ptr model = lf->get_model(); - model->WhitenSystem(A_act2, b_act2); - EQUALITY(A_act1, A_act2); - EQUALITY(b_act1, b_act2); -} - -/* ************************************************************************* */ -TEST( GaussianFactor, matrix_aug ) -{ - // create a small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // get the factor "f2" from the factor graph - //GaussianFactor::shared_ptr lf = fg[1]; - Vector b2 = Vector_(2, 0.2, -0.1); - Matrix I = eye(2); - GaussianFactor::shared_ptr lf(new GaussianFactor("x1", -I, "x2", I, b2, sigma0_1)); - - // render with a given ordering - Ordering ord; - ord += "x1","x2"; - - // Test unwhitened version - Matrix Ab_act1; - Ab_act1 = lf->matrix_augmented(ord, false); - - Matrix Ab1 = Matrix_(2,5, - -1.0, 0.0, 1.0, 0.0, 0.2, - 00.0,- 1.0, 0.0, 1.0, -0.1 ); - - EQUALITY(Ab_act1,Ab1); - - // Test whitened version - Matrix Ab_act2; - Ab_act2 = lf->matrix_augmented(ord, true); - - Matrix Ab2 = Matrix_(2,5, - -10.0, 0.0, 10.0, 0.0, 2.0, - 00.0, -10.0, 0.0, 10.0, -1.0 ); - - EQUALITY(Ab_act2,Ab2); - - // Ensure that whitening is consistent - shared_ptr model = lf->get_model(); - model->WhitenInPlace(Ab_act1); - EQUALITY(Ab_act1, Ab_act2); -} - /* ************************************************************************* */ // small aux. function to print out lists of anything template @@ -568,80 +306,6 @@ void print(const list& i) { cout << endl; } -/* ************************************************************************* */ -TEST( GaussianFactor, sparse ) -{ - // create a small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // get the factor "f2" from the factor graph - GaussianFactor::shared_ptr lf = fg[1]; - - // render with a given ordering - Ordering ord; - ord += "x1","x2"; - - list i,j; - list s; - boost::tie(i,j,s) = lf->sparse(fg.columnIndices(ord)); - - list i1,j1; - i1 += 1,2,1,2; - j1 += 1,2,3,4; - - list s1; - s1 += -10,-10,10,10; - - CHECK(i==i1); - CHECK(j==j1); - CHECK(s==s1); -} - -/* ************************************************************************* */ -TEST( GaussianFactor, sparse2 ) -{ - // create a small linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // get the factor "f2" from the factor graph - GaussianFactor::shared_ptr lf = fg[1]; - - // render with a given ordering - Ordering ord; - ord += "x2","l1","x1"; - - list i,j; - list s; - boost::tie(i,j,s) = lf->sparse(fg.columnIndices(ord)); - - list i1,j1; - i1 += 1,2,1,2; - j1 += 5,6,1,2; - - list s1; - s1 += -10,-10,10,10; - - CHECK(i==i1); - CHECK(j==j1); - CHECK(s==s1); -} - -/* ************************************************************************* */ -TEST( GaussianFactor, size ) -{ - // create a linear factor graph - GaussianFactorGraph fg = createGaussianFactorGraph(); - - // get some factors from the graph - boost::shared_ptr factor1 = fg[0]; - boost::shared_ptr factor2 = fg[1]; - boost::shared_ptr factor3 = fg[2]; - - CHECK(factor1->size() == 1); - CHECK(factor2->size() == 2); - CHECK(factor3->size() == 2); -} - /* ************************************************************************* */ TEST( GaussianFactor, tally_separator ) { diff --git a/cpp/testISAM.cpp b/cpp/testISAM.cpp index e2e13253b..4ee823161 100644 --- a/cpp/testISAM.cpp +++ b/cpp/testISAM.cpp @@ -17,7 +17,6 @@ using namespace boost::assign; #include "Ordering.h" #include "GaussianBayesNet.h" #include "ISAM-inl.h" -#include "smallExample.h" using namespace std; using namespace gtsam; diff --git a/cpp/testJunctionTree.cpp b/cpp/testJunctionTree.cpp index 7859e8088..2a813e7f2 100644 --- a/cpp/testJunctionTree.cpp +++ b/cpp/testJunctionTree.cpp @@ -16,12 +16,10 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY -#include "smallExample.h" #include "JunctionTree-inl.h" using namespace std; using namespace gtsam; -using namespace example; /* ************************************************************************* */ /** @@ -57,44 +55,6 @@ TEST( GaussianFactorGraph, constructor ) LONGS_EQUAL(2, junctionTree.root()->children()[0]->size()); } -/* ************************************************************************* * - Bayes tree for smoother with "nested dissection" ordering: - C1 x5 x6 x4 - C2 x3 x2 : x4 - C3 x1 : x2 - C4 x7 : x6 -/* ************************************************************************* */ -TEST( GaussianFactorGraph, constructor2 ) -{ - // create a graph - GaussianFactorGraph fg = createSmoother(7); - - // create an ordering - Ordering ordering; ordering += "x1","x3","x5","x7","x2","x6","x4"; - - GaussianJunctionTree junctionTree(fg, ordering); - Ordering frontal1; frontal1 += "x5", "x6", "x4"; - Ordering frontal2; frontal2 += "x3", "x2"; - Ordering frontal3; frontal3 += "x1"; - Ordering frontal4; frontal4 += "x7"; - Unordered sep1; - Unordered sep2; sep2 += "x4"; - Unordered sep3; sep3 += "x2"; - Unordered sep4; sep4 += "x6"; - CHECK(assert_equal(frontal1, junctionTree.root()->frontal())); - CHECK(assert_equal(sep1, junctionTree.root()->separator())); - LONGS_EQUAL(5, junctionTree.root()->size()); - CHECK(assert_equal(frontal2, junctionTree.root()->children()[0]->frontal())); - CHECK(assert_equal(sep2, junctionTree.root()->children()[0]->separator())); - LONGS_EQUAL(4, junctionTree.root()->children()[0]->size()); - CHECK(assert_equal(frontal3, junctionTree.root()->children()[0]->children()[0]->frontal())); - CHECK(assert_equal(sep3, junctionTree.root()->children()[0]->children()[0]->separator())); - LONGS_EQUAL(2, junctionTree.root()->children()[0]->children()[0]->size()); - CHECK(assert_equal(frontal4, junctionTree.root()->children()[1]->frontal())); - CHECK(assert_equal(sep4, junctionTree.root()->children()[1]->separator())); - LONGS_EQUAL(2, junctionTree.root()->children()[1]->size()); -} - /* ************************************************************************* */ /** * x1 - x2 - x3 - x4 @@ -139,25 +99,6 @@ TEST( GaussianFactorGraph, eliminate ) CHECK(assert_equal(bayesTree_expected, bayesTree)); } -/* ************************************************************************* * -TEST( GaussianFactorGraph, optimizeMultiFrontal ) -{ - // create a graph - GaussianFactorGraph fg = createSmoother(7); - - // create an ordering - Ordering ordering; ordering += "x1","x3","x5","x7","x2","x6","x4"; - - // optimize the graph - GaussianJunctionTree junctionTree(fg, ordering); - VectorConfig actual = junctionTree.optimize(); - - // verify -// VectorConfig expected = createCorrectDelta(); -// -// CHECK(assert_equal(expected,actual)); -} - /* ************************************************************************* */ int main() { TestResult tr; return TestRegistry::runAllTests(tr);} /* ************************************************************************* */ diff --git a/cpp/testLieConfig.cpp b/cpp/testLieConfig.cpp index 876704a2a..e55126f08 100644 --- a/cpp/testLieConfig.cpp +++ b/cpp/testLieConfig.cpp @@ -13,7 +13,6 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY -#include "Pose2.h" #include "LieConfig-inl.h" #include "Vector.h" diff --git a/cpp/testOrdering.cpp b/cpp/testOrdering.cpp index acada7984..7e5ae193c 100644 --- a/cpp/testOrdering.cpp +++ b/cpp/testOrdering.cpp @@ -12,7 +12,6 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY #include "Ordering.h" -#include "pose2SLAM.h" using namespace std; using namespace gtsam; diff --git a/cpp/testSymbolicBayesNet.cpp b/cpp/testSymbolicBayesNet.cpp index 53b16d077..cbe4e040c 100644 --- a/cpp/testSymbolicBayesNet.cpp +++ b/cpp/testSymbolicBayesNet.cpp @@ -13,13 +13,11 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY #include "Ordering.h" -#include "smallExample.h" #include "SymbolicBayesNet.h" #include "SymbolicFactorGraph.h" using namespace std; using namespace gtsam; -using namespace example; Symbol _B_('B', 0), _L_('L', 0); SymbolicConditional::shared_ptr @@ -39,31 +37,6 @@ TEST( SymbolicBayesNet, equals ) CHECK(!f1.equals(f2)); } -/* ************************************************************************* */ -TEST( SymbolicBayesNet, constructor ) -{ - // Create manually - SymbolicConditional::shared_ptr - x2(new SymbolicConditional("x2","l1", "x1")), - l1(new SymbolicConditional("l1","x1")), - x1(new SymbolicConditional("x1")); - SymbolicBayesNet expected; - expected.push_back(x2); - expected.push_back(l1); - expected.push_back(x1); - - // Create from a factor graph - GaussianFactorGraph factorGraph = createGaussianFactorGraph(); - SymbolicFactorGraph fg(factorGraph); - - // eliminate it - Ordering ordering; - ordering += "x2","l1","x1"; - SymbolicBayesNet actual = fg.eliminate(ordering); - - CHECK(assert_equal(expected, actual)); -} - /* ************************************************************************* */ TEST( SymbolicBayesNet, pop_front ) { diff --git a/cpp/testSymbolicFactorGraph.cpp b/cpp/testSymbolicFactorGraph.cpp index d2a0a12dd..f4670ac93 100644 --- a/cpp/testSymbolicFactorGraph.cpp +++ b/cpp/testSymbolicFactorGraph.cpp @@ -12,130 +12,15 @@ using namespace boost::assign; #define GTSAM_MAGIC_KEY #include "Ordering.h" -#include "smallExample.h" #include "SymbolicFactorGraph.h" #include "SymbolicBayesNet.h" #include "FactorGraph-inl.h" using namespace std; using namespace gtsam; -using namespace example; /* ************************************************************************* */ -TEST( SymbolicFactorGraph, symbolicFactorGraph ) -{ - // construct expected symbolic graph - SymbolicFactorGraph expected; - expected.push_factor("x1"); - expected.push_factor("x1","x2"); - expected.push_factor("l1","x1"); - expected.push_factor("l1","x2"); - - // construct it from the factor graph - GaussianFactorGraph factorGraph = createGaussianFactorGraph(); - SymbolicFactorGraph actual(factorGraph); - - CHECK(assert_equal(expected, actual)); -} - -/* ************************************************************************* */ -TEST( SymbolicFactorGraph, findAndRemoveFactors ) -{ - // construct it from the factor graph graph - GaussianFactorGraph factorGraph = createGaussianFactorGraph(); - SymbolicFactorGraph actual(factorGraph); - SymbolicFactor::shared_ptr f1 = actual[0]; - SymbolicFactor::shared_ptr f3 = actual[2]; - actual.findAndRemoveFactors("x2"); - - // construct expected graph after find_factors_and_remove - SymbolicFactorGraph expected; - SymbolicFactor::shared_ptr null; - expected.push_back(f1); - expected.push_back(null); - expected.push_back(f3); - expected.push_back(null); - - CHECK(assert_equal(expected, actual)); -} -/* ************************************************************************* */ -TEST( SymbolicFactorGraph, factors) -{ - // create a test graph - GaussianFactorGraph factorGraph = createGaussianFactorGraph(); - SymbolicFactorGraph fg(factorGraph); - - // ask for all factor indices connected to x1 - list x1_factors = fg.factors("x1"); - int x1_indices[] = { 0, 1, 2 }; - list x1_expected(x1_indices, x1_indices + 3); - CHECK(x1_factors==x1_expected); - - // ask for all factor indices connected to x2 - list x2_factors = fg.factors("x2"); - int x2_indices[] = { 1, 3 }; - list x2_expected(x2_indices, x2_indices + 2); - CHECK(x2_factors==x2_expected); -} - -/* ************************************************************************* */ -TEST( SymbolicFactorGraph, removeAndCombineFactors ) -{ - // create a test graph - GaussianFactorGraph factorGraph = createGaussianFactorGraph(); - SymbolicFactorGraph fg(factorGraph); - - // combine all factors connected to x1 - SymbolicFactor::shared_ptr actual = removeAndCombineFactors(fg,"x1"); - - // check result - SymbolicFactor expected("l1","x1","x2"); - CHECK(assert_equal(expected,*actual)); -} - -/* ************************************************************************* */ -TEST( SymbolicFactorGraph, eliminateOne ) -{ - // create a test graph - GaussianFactorGraph factorGraph = createGaussianFactorGraph(); - SymbolicFactorGraph fg(factorGraph); - - // eliminate - SymbolicConditional::shared_ptr actual = fg.eliminateOne("x1"); - - // create expected symbolic Conditional - SymbolicConditional expected("x1","l1","x2"); - - CHECK(assert_equal(expected,*actual)); -} - -/* ************************************************************************* */ -TEST( GaussianFactorGraph, eliminate ) -{ - // create expected Chordal bayes Net - SymbolicConditional::shared_ptr x2(new SymbolicConditional("x2", "l1", "x1")); - SymbolicConditional::shared_ptr l1(new SymbolicConditional("l1", "x1")); - SymbolicConditional::shared_ptr x1(new SymbolicConditional("x1")); - - SymbolicBayesNet expected; - expected.push_back(x2); - expected.push_back(l1); - expected.push_back(x1); - - // create a test graph - GaussianFactorGraph factorGraph = createGaussianFactorGraph(); - SymbolicFactorGraph fg(factorGraph); - - // eliminate it - Ordering ordering; - ordering += "x2","l1","x1"; - SymbolicBayesNet actual = fg.eliminate(ordering); - - CHECK(assert_equal(expected,actual)); -} - -/* ************************************************************************* */ -TEST( GaussianFactorGraph, eliminate2 ) +TEST( SymbolicFactorGraph, eliminate2 ) { // create a test graph SymbolicFactorGraph fg; diff --git a/cpp/Cal3_S2.cpp b/geometry/Cal3_S2.cpp similarity index 100% rename from cpp/Cal3_S2.cpp rename to geometry/Cal3_S2.cpp diff --git a/cpp/Cal3_S2.h b/geometry/Cal3_S2.h similarity index 100% rename from cpp/Cal3_S2.h rename to geometry/Cal3_S2.h diff --git a/cpp/CalibratedCamera.cpp b/geometry/CalibratedCamera.cpp similarity index 100% rename from cpp/CalibratedCamera.cpp rename to geometry/CalibratedCamera.cpp diff --git a/cpp/CalibratedCamera.h b/geometry/CalibratedCamera.h similarity index 100% rename from cpp/CalibratedCamera.h rename to geometry/CalibratedCamera.h diff --git a/geometry/Makefile.in b/geometry/Makefile.in new file mode 100644 index 000000000..a3b6e906e --- /dev/null +++ b/geometry/Makefile.in @@ -0,0 +1,823 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#---------------------------------------------------------------------------------------------------- +# GTSAM geometry +#---------------------------------------------------------------------------------------------------- + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testPoint2$(EXEEXT) testRot2$(EXEEXT) \ + testPose2$(EXEEXT) testPoint3$(EXEEXT) testRot3$(EXEEXT) \ + testPose3$(EXEEXT) testCal3_S2$(EXEEXT) \ + testCalibratedCamera$(EXEEXT) testSimpleCamera$(EXEEXT) \ + testTensors$(EXEEXT) testHomography2$(EXEEXT) \ + testTrifocal$(EXEEXT) +noinst_PROGRAMS = timeRot3$(EXEEXT) +subdir = geometry +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgeometry_la_LIBADD = +am__objects_1 = Point2.lo Rot2.lo Pose2.lo Point3.lo Rot3.lo Pose3.lo \ + Cal3_S2.lo CalibratedCamera.lo SimpleCamera.lo \ + projectiveGeometry.lo tensorInterface.lo +am_libgeometry_la_OBJECTS = $(am__objects_1) +libgeometry_la_OBJECTS = $(am_libgeometry_la_OBJECTS) +PROGRAMS = $(noinst_PROGRAMS) +testCal3_S2_SOURCES = testCal3_S2.cpp +testCal3_S2_OBJECTS = testCal3_S2.$(OBJEXT) +testCal3_S2_LDADD = $(LDADD) +testCal3_S2_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testCalibratedCamera_SOURCES = testCalibratedCamera.cpp +testCalibratedCamera_OBJECTS = testCalibratedCamera.$(OBJEXT) +testCalibratedCamera_LDADD = $(LDADD) +testCalibratedCamera_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testHomography2_SOURCES = testHomography2.cpp +testHomography2_OBJECTS = testHomography2.$(OBJEXT) +testHomography2_LDADD = $(LDADD) +testHomography2_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testPoint2_SOURCES = testPoint2.cpp +testPoint2_OBJECTS = testPoint2.$(OBJEXT) +testPoint2_LDADD = $(LDADD) +testPoint2_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testPoint3_SOURCES = testPoint3.cpp +testPoint3_OBJECTS = testPoint3.$(OBJEXT) +testPoint3_LDADD = $(LDADD) +testPoint3_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testPose2_SOURCES = testPose2.cpp +testPose2_OBJECTS = testPose2.$(OBJEXT) +testPose2_LDADD = $(LDADD) +testPose2_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testPose3_SOURCES = testPose3.cpp +testPose3_OBJECTS = testPose3.$(OBJEXT) +testPose3_LDADD = $(LDADD) +testPose3_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testRot2_SOURCES = testRot2.cpp +testRot2_OBJECTS = testRot2.$(OBJEXT) +testRot2_LDADD = $(LDADD) +testRot2_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testRot3_SOURCES = testRot3.cpp +testRot3_OBJECTS = testRot3.$(OBJEXT) +testRot3_LDADD = $(LDADD) +testRot3_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testSimpleCamera_SOURCES = testSimpleCamera.cpp +testSimpleCamera_OBJECTS = testSimpleCamera.$(OBJEXT) +testSimpleCamera_LDADD = $(LDADD) +testSimpleCamera_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testTensors_SOURCES = testTensors.cpp +testTensors_OBJECTS = testTensors.$(OBJEXT) +testTensors_LDADD = $(LDADD) +testTensors_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +testTrifocal_SOURCES = testTrifocal.cpp +testTrifocal_OBJECTS = testTrifocal.$(OBJEXT) +testTrifocal_LDADD = $(LDADD) +testTrifocal_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +timeRot3_SOURCES = timeRot3.cpp +timeRot3_OBJECTS = timeRot3.$(OBJEXT) +timeRot3_LDADD = $(LDADD) +timeRot3_DEPENDENCIES = libgeometry.la ../base/libbase.la \ + ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgeometry_la_SOURCES) testCal3_S2.cpp \ + testCalibratedCamera.cpp testHomography2.cpp testPoint2.cpp \ + testPoint3.cpp testPose2.cpp testPose3.cpp testRot2.cpp \ + testRot3.cpp testSimpleCamera.cpp testTensors.cpp \ + testTrifocal.cpp timeRot3.cpp +DIST_SOURCES = $(libgeometry_la_SOURCES) testCal3_S2.cpp \ + testCalibratedCamera.cpp testHomography2.cpp testPoint2.cpp \ + testPoint3.cpp testPose2.cpp testPose3.cpp testRot2.cpp \ + testRot3.cpp testSimpleCamera.cpp testTensors.cpp \ + testTrifocal.cpp timeRot3.cpp +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +boost = @boost@ +boost_serialization = @boost_serialization@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +toolbox = @toolbox@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Tensors + +#---------------------------------------------------------------------------------------------------- +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +# The headers are installed in $(includedir)/gtsam: +#---------------------------------------------------------------------------------------------------- +headers = tensors.h Tensor1.h Tensor2.h Tensor3.h Tensor4.h Tensor5.h \ + Tensor1Expression.h Tensor2Expression.h Tensor3Expression.h \ + Tensor5Expression.h $(sources:.cpp=.h) + +# Points and poses + +# Cameras +sources = Point2.cpp Rot2.cpp Pose2.cpp Point3.cpp Rot3.cpp Pose3.cpp \ + Cal3_S2.cpp CalibratedCamera.cpp SimpleCamera.cpp \ + projectiveGeometry.cpp tensorInterface.cpp +pkginclude_HEADERS = $(headers) +noinst_LTLIBRARIES = libgeometry.la +libgeometry_la_SOURCES = $(sources) +AM_CPPFLAGS = -I$(boost) -I../base + +#---------------------------------------------------------------------------------------------------- +# rules to build local programs +#---------------------------------------------------------------------------------------------------- +TESTS = $(check_PROGRAMS) +AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) +LDADD = libgeometry.la ../base/libbase.la ../ldl/libldl.la ../CppUnitLite/libCppUnitLite.a +AM_DEFAULT_SOURCE_EXT = .cpp +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu geometry/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu geometry/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libgeometry.la: $(libgeometry_la_OBJECTS) $(libgeometry_la_DEPENDENCIES) + $(CXXLINK) $(libgeometry_la_OBJECTS) $(libgeometry_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testCal3_S2$(EXEEXT): $(testCal3_S2_OBJECTS) $(testCal3_S2_DEPENDENCIES) + @rm -f testCal3_S2$(EXEEXT) + $(CXXLINK) $(testCal3_S2_OBJECTS) $(testCal3_S2_LDADD) $(LIBS) +testCalibratedCamera$(EXEEXT): $(testCalibratedCamera_OBJECTS) $(testCalibratedCamera_DEPENDENCIES) + @rm -f testCalibratedCamera$(EXEEXT) + $(CXXLINK) $(testCalibratedCamera_OBJECTS) $(testCalibratedCamera_LDADD) $(LIBS) +testHomography2$(EXEEXT): $(testHomography2_OBJECTS) $(testHomography2_DEPENDENCIES) + @rm -f testHomography2$(EXEEXT) + $(CXXLINK) $(testHomography2_OBJECTS) $(testHomography2_LDADD) $(LIBS) +testPoint2$(EXEEXT): $(testPoint2_OBJECTS) $(testPoint2_DEPENDENCIES) + @rm -f testPoint2$(EXEEXT) + $(CXXLINK) $(testPoint2_OBJECTS) $(testPoint2_LDADD) $(LIBS) +testPoint3$(EXEEXT): $(testPoint3_OBJECTS) $(testPoint3_DEPENDENCIES) + @rm -f testPoint3$(EXEEXT) + $(CXXLINK) $(testPoint3_OBJECTS) $(testPoint3_LDADD) $(LIBS) +testPose2$(EXEEXT): $(testPose2_OBJECTS) $(testPose2_DEPENDENCIES) + @rm -f testPose2$(EXEEXT) + $(CXXLINK) $(testPose2_OBJECTS) $(testPose2_LDADD) $(LIBS) +testPose3$(EXEEXT): $(testPose3_OBJECTS) $(testPose3_DEPENDENCIES) + @rm -f testPose3$(EXEEXT) + $(CXXLINK) $(testPose3_OBJECTS) $(testPose3_LDADD) $(LIBS) +testRot2$(EXEEXT): $(testRot2_OBJECTS) $(testRot2_DEPENDENCIES) + @rm -f testRot2$(EXEEXT) + $(CXXLINK) $(testRot2_OBJECTS) $(testRot2_LDADD) $(LIBS) +testRot3$(EXEEXT): $(testRot3_OBJECTS) $(testRot3_DEPENDENCIES) + @rm -f testRot3$(EXEEXT) + $(CXXLINK) $(testRot3_OBJECTS) $(testRot3_LDADD) $(LIBS) +testSimpleCamera$(EXEEXT): $(testSimpleCamera_OBJECTS) $(testSimpleCamera_DEPENDENCIES) + @rm -f testSimpleCamera$(EXEEXT) + $(CXXLINK) $(testSimpleCamera_OBJECTS) $(testSimpleCamera_LDADD) $(LIBS) +testTensors$(EXEEXT): $(testTensors_OBJECTS) $(testTensors_DEPENDENCIES) + @rm -f testTensors$(EXEEXT) + $(CXXLINK) $(testTensors_OBJECTS) $(testTensors_LDADD) $(LIBS) +testTrifocal$(EXEEXT): $(testTrifocal_OBJECTS) $(testTrifocal_DEPENDENCIES) + @rm -f testTrifocal$(EXEEXT) + $(CXXLINK) $(testTrifocal_OBJECTS) $(testTrifocal_LDADD) $(LIBS) +timeRot3$(EXEEXT): $(timeRot3_OBJECTS) $(timeRot3_DEPENDENCIES) + @rm -f timeRot3$(EXEEXT) + $(CXXLINK) $(timeRot3_OBJECTS) $(timeRot3_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cal3_S2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CalibratedCamera.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Point2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Point3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pose2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pose3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rot2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rot3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SimpleCamera.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/projectiveGeometry.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tensorInterface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testCal3_S2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testCalibratedCamera.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testHomography2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPoint2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPoint3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPose2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPose3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRot2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRot3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSimpleCamera.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testTensors.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testTrifocal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeRot3.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkgincludeHEADERS + + +# rule to run an executable +%.run: % $(LDADD) + ./$^ + +#---------------------------------------------------------------------------------------------------- + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cpp/Point2.cpp b/geometry/Point2.cpp similarity index 100% rename from cpp/Point2.cpp rename to geometry/Point2.cpp diff --git a/cpp/Point2.h b/geometry/Point2.h similarity index 100% rename from cpp/Point2.h rename to geometry/Point2.h diff --git a/cpp/Point3.cpp b/geometry/Point3.cpp similarity index 100% rename from cpp/Point3.cpp rename to geometry/Point3.cpp diff --git a/cpp/Point3.h b/geometry/Point3.h similarity index 100% rename from cpp/Point3.h rename to geometry/Point3.h diff --git a/cpp/Pose2.cpp b/geometry/Pose2.cpp similarity index 100% rename from cpp/Pose2.cpp rename to geometry/Pose2.cpp diff --git a/cpp/Pose2.h b/geometry/Pose2.h similarity index 100% rename from cpp/Pose2.h rename to geometry/Pose2.h diff --git a/cpp/Pose3.cpp b/geometry/Pose3.cpp similarity index 99% rename from cpp/Pose3.cpp rename to geometry/Pose3.cpp index 379e24bda..de153a76c 100644 --- a/cpp/Pose3.cpp +++ b/geometry/Pose3.cpp @@ -6,7 +6,6 @@ #include #include "Pose3.h" #include "Lie-inl.h" -#include "LieConfig.h" using namespace std; using namespace boost::numeric::ublas; diff --git a/cpp/Pose3.h b/geometry/Pose3.h similarity index 100% rename from cpp/Pose3.h rename to geometry/Pose3.h diff --git a/cpp/Rot2.cpp b/geometry/Rot2.cpp similarity index 100% rename from cpp/Rot2.cpp rename to geometry/Rot2.cpp diff --git a/cpp/Rot2.h b/geometry/Rot2.h similarity index 100% rename from cpp/Rot2.h rename to geometry/Rot2.h diff --git a/cpp/Rot3.cpp b/geometry/Rot3.cpp similarity index 100% rename from cpp/Rot3.cpp rename to geometry/Rot3.cpp diff --git a/cpp/Rot3.h b/geometry/Rot3.h similarity index 100% rename from cpp/Rot3.h rename to geometry/Rot3.h diff --git a/cpp/SimpleCamera.cpp b/geometry/SimpleCamera.cpp similarity index 100% rename from cpp/SimpleCamera.cpp rename to geometry/SimpleCamera.cpp diff --git a/cpp/SimpleCamera.h b/geometry/SimpleCamera.h similarity index 100% rename from cpp/SimpleCamera.h rename to geometry/SimpleCamera.h diff --git a/cpp/Tensor1.h b/geometry/Tensor1.h similarity index 100% rename from cpp/Tensor1.h rename to geometry/Tensor1.h diff --git a/cpp/Tensor1Expression.h b/geometry/Tensor1Expression.h similarity index 100% rename from cpp/Tensor1Expression.h rename to geometry/Tensor1Expression.h diff --git a/cpp/Tensor2.h b/geometry/Tensor2.h similarity index 100% rename from cpp/Tensor2.h rename to geometry/Tensor2.h diff --git a/cpp/Tensor2Expression.h b/geometry/Tensor2Expression.h similarity index 100% rename from cpp/Tensor2Expression.h rename to geometry/Tensor2Expression.h diff --git a/cpp/Tensor3.h b/geometry/Tensor3.h similarity index 100% rename from cpp/Tensor3.h rename to geometry/Tensor3.h diff --git a/cpp/Tensor3Expression.h b/geometry/Tensor3Expression.h similarity index 100% rename from cpp/Tensor3Expression.h rename to geometry/Tensor3Expression.h diff --git a/cpp/Tensor4.h b/geometry/Tensor4.h similarity index 100% rename from cpp/Tensor4.h rename to geometry/Tensor4.h diff --git a/cpp/Tensor5.h b/geometry/Tensor5.h similarity index 100% rename from cpp/Tensor5.h rename to geometry/Tensor5.h diff --git a/cpp/Tensor5Expression.h b/geometry/Tensor5Expression.h similarity index 100% rename from cpp/Tensor5Expression.h rename to geometry/Tensor5Expression.h diff --git a/cpp/projectiveGeometry.cpp b/geometry/projectiveGeometry.cpp similarity index 100% rename from cpp/projectiveGeometry.cpp rename to geometry/projectiveGeometry.cpp diff --git a/cpp/projectiveGeometry.h b/geometry/projectiveGeometry.h similarity index 100% rename from cpp/projectiveGeometry.h rename to geometry/projectiveGeometry.h diff --git a/cpp/tensorInterface.cpp b/geometry/tensorInterface.cpp similarity index 100% rename from cpp/tensorInterface.cpp rename to geometry/tensorInterface.cpp diff --git a/cpp/tensorInterface.h b/geometry/tensorInterface.h similarity index 100% rename from cpp/tensorInterface.h rename to geometry/tensorInterface.h diff --git a/cpp/tensors.h b/geometry/tensors.h similarity index 100% rename from cpp/tensors.h rename to geometry/tensors.h diff --git a/cpp/testCal3_S2.cpp b/geometry/testCal3_S2.cpp similarity index 100% rename from cpp/testCal3_S2.cpp rename to geometry/testCal3_S2.cpp diff --git a/cpp/testCalibratedCamera.cpp b/geometry/testCalibratedCamera.cpp similarity index 100% rename from cpp/testCalibratedCamera.cpp rename to geometry/testCalibratedCamera.cpp diff --git a/cpp/testHomography2.cpp b/geometry/testHomography2.cpp similarity index 100% rename from cpp/testHomography2.cpp rename to geometry/testHomography2.cpp diff --git a/cpp/testPoint2.cpp b/geometry/testPoint2.cpp similarity index 100% rename from cpp/testPoint2.cpp rename to geometry/testPoint2.cpp diff --git a/cpp/testPoint3.cpp b/geometry/testPoint3.cpp similarity index 100% rename from cpp/testPoint3.cpp rename to geometry/testPoint3.cpp diff --git a/cpp/testPose2.cpp b/geometry/testPose2.cpp similarity index 100% rename from cpp/testPose2.cpp rename to geometry/testPose2.cpp diff --git a/cpp/testPose3.cpp b/geometry/testPose3.cpp similarity index 100% rename from cpp/testPose3.cpp rename to geometry/testPose3.cpp diff --git a/cpp/testRot2.cpp b/geometry/testRot2.cpp similarity index 100% rename from cpp/testRot2.cpp rename to geometry/testRot2.cpp diff --git a/cpp/testRot3.cpp b/geometry/testRot3.cpp similarity index 100% rename from cpp/testRot3.cpp rename to geometry/testRot3.cpp diff --git a/cpp/testSimpleCamera.cpp b/geometry/testSimpleCamera.cpp similarity index 100% rename from cpp/testSimpleCamera.cpp rename to geometry/testSimpleCamera.cpp diff --git a/cpp/testTensors.cpp b/geometry/testTensors.cpp similarity index 100% rename from cpp/testTensors.cpp rename to geometry/testTensors.cpp diff --git a/cpp/testTrifocal.cpp b/geometry/testTrifocal.cpp similarity index 100% rename from cpp/testTrifocal.cpp rename to geometry/testTrifocal.cpp diff --git a/cpp/timeRot3.cpp b/geometry/timeRot3.cpp similarity index 100% rename from cpp/timeRot3.cpp rename to geometry/timeRot3.cpp diff --git a/ldl/Makefile b/ldl/Makefile deleted file mode 100644 index f8e8afb57..000000000 --- a/ldl/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -#------------------------------------------------------------------------------- -# Makefile for the LDL library -#------------------------------------------------------------------------------- - -default: all - -include ./UFconfig.mk - -CXXFLAGS += -O2 -CXXFLAGS += -fPIC -I./ - -CXX ?= g++ - -all: demo - -#------------------------------------------------------------------------------- -# the ldl library: -#------------------------------------------------------------------------------- - -libldl.a: ldl.cpp ldl.h - $(CXX) $(CXXFLAGS) -c ldl.cpp -o ldl.o - $(AR) libldl.a ldl.o - $(RANLIB) libldl.a - -demo: ldlsimple.cpp libldl.a - $(CXX) $(CXXFLAGS) $(LDFLAGS) ldlsimple.cpp -o ldldemo -L./ -lldl - -clean: - $(RM) $(CLEAN) libldl.a ldldemo - -check: - echo 'no check for ldl' - -distdir: - -install: all - -distclean: clean - diff --git a/ldl/Makefile.am b/ldl/Makefile.am new file mode 100644 index 000000000..c2bbfca7b --- /dev/null +++ b/ldl/Makefile.am @@ -0,0 +1,8 @@ +#---------------------------------------------------------------------------------------------------- +# ldl +# replaced Makefile with automake for easy linking +#---------------------------------------------------------------------------------------------------- + +noinst_LTLIBRARIES = libldl.la +libldl_la_SOURCES = ldl.cpp +noinst_HEADERS = ldl.h UFconfig.h diff --git a/ldl/Makefile.in b/ldl/Makefile.in new file mode 100644 index 000000000..8548cc29a --- /dev/null +++ b/ldl/Makefile.in @@ -0,0 +1,483 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#---------------------------------------------------------------------------------------------------- +# ldl +# replaced Makefile with automake for easy linking +#---------------------------------------------------------------------------------------------------- + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ldl +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libldl_la_LIBADD = +am_libldl_la_OBJECTS = ldl.lo +libldl_la_OBJECTS = $(am_libldl_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libldl_la_SOURCES) +DIST_SOURCES = $(libldl_la_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +boost = @boost@ +boost_serialization = @boost_serialization@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +toolbox = @toolbox@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libldl.la +libldl_la_SOURCES = ldl.cpp +noinst_HEADERS = ldl.h UFconfig.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ldl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ldl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libldl.la: $(libldl_la_OBJECTS) $(libldl_la_DEPENDENCIES) + $(CXXLINK) $(libldl_la_OBJECTS) $(libldl_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldl.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/myconfigure b/myconfigure index f6361eefb..2e75d2eeb 100755 --- a/myconfigure +++ b/myconfigure @@ -1 +1 @@ -./configure --prefix=$HOME --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ CXXFLAGS=" -O2 -march=core2 -DNDEBUG" --disable-static --enable-lapack +./configure --prefix=$HOME --with-toolbox=$HOME/toolbox/ --with-boost=/opt/local/include/ CXXFLAGS=" -O2 -march=core2 -DNDEBUG" --disable-static --enable-blas --enable-lapack diff --git a/cpp/BearingFactor.h b/slam/BearingFactor.h similarity index 100% rename from cpp/BearingFactor.h rename to slam/BearingFactor.h diff --git a/cpp/BearingRangeFactor.h b/slam/BearingRangeFactor.h similarity index 100% rename from cpp/BearingRangeFactor.h rename to slam/BearingRangeFactor.h diff --git a/cpp/BetweenFactor.h b/slam/BetweenFactor.h similarity index 100% rename from cpp/BetweenFactor.h rename to slam/BetweenFactor.h diff --git a/cpp/GaussianISAM2.cpp b/slam/GaussianISAM2.cpp similarity index 93% rename from cpp/GaussianISAM2.cpp rename to slam/GaussianISAM2.cpp index 111336ff2..b337a68e7 100644 --- a/cpp/GaussianISAM2.cpp +++ b/slam/GaussianISAM2.cpp @@ -12,8 +12,8 @@ using namespace gtsam; // Explicitly instantiate so we don't have to include everywhere #include "ISAM2-inl.h" -//template class ISAM2; -//template class ISAM2; +template class ISAM2; +template class ISAM2; namespace gtsam { diff --git a/cpp/GaussianISAM2.h b/slam/GaussianISAM2.h similarity index 100% rename from cpp/GaussianISAM2.h rename to slam/GaussianISAM2.h diff --git a/slam/Makefile.am b/slam/Makefile.am new file mode 100644 index 000000000..71f1c1d29 --- /dev/null +++ b/slam/Makefile.am @@ -0,0 +1,77 @@ +#---------------------------------------------------------------------------------------------------- +# SLAM and SFM sources +#---------------------------------------------------------------------------------------------------- + +headers = +sources = +check_PROGRAMS = + +# simulated2D example +headers += Simulated2DConfig.h +headers += Simulated2DPosePrior.h Simulated2DPointPrior.h +headers += Simulated2DOdometry.h Simulated2DMeasurement.h +sources += simulated2D.cpp +check_PROGRAMS += testSimulated2D + +# simulated2DOriented example +headers += Simulated2DOrientedConfig.h +headers += Simulated2DOrientedPosePrior.h +headers += Simulated2DOrientedOdometry.h +sources += simulated2DOriented.cpp +check_PROGRAMS += testSimulated2DOriented + +# simulated3D example +sources += Simulated3D.cpp +check_PROGRAMS += testSimulated3D + +# Pose SLAM headers +headers += BetweenFactor.h PriorFactor.h + +# 2D Pose SLAM +sources += pose2SLAM.cpp Pose2SLAMOptimizer.cpp dataset.cpp +check_PROGRAMS += testPose2Factor testPose2Config testPose2SLAM testPose2Prior + +# 2D SLAM using Bearing and Range +headers += BearingFactor.h RangeFactor.h BearingRangeFactor.h +sources += planarSLAM.cpp +check_PROGRAMS += testPlanarSLAM + +# 3D Pose constraints +sources += pose3SLAM.cpp +check_PROGRAMS += testPose3Factor testPose3Config testPose3SLAM + +# Visual SLAM +sources += visualSLAM.cpp +check_PROGRAMS += testVSLAMFactor testVSLAMGraph testVSLAMConfig + +# GaussianISAM2 is fairly SLAM-specific +sources += GaussianISAM2.cpp + +#---------------------------------------------------------------------------------------------------- +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +# The headers are installed in $(includedir)/gtsam: +#---------------------------------------------------------------------------------------------------- +headers += $(sources:.cpp=.h) +pkginclude_HEADERS = $(headers) +noinst_LTLIBRARIES = libslam.la +libslam_la_SOURCES = $(sources) +AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../cpp -I../geometry + +#---------------------------------------------------------------------------------------------------- +# rules to build local programs +#---------------------------------------------------------------------------------------------------- +TESTS = $(check_PROGRAMS) +AM_DEFAULT_SOURCE_EXT = .cpp +AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) +LDADD = libslam.la ../geometry/libgeometry.la ../cpp/libcpp.la ../base/libbase.la +LDADD += ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la ../colamd/libcolamd.la + +if USE_LAPACK +LDADD += ../spqr_mini/libspqr_mini.la +endif + +# rule to run an executable +%.run: % $(LDADD) + ./$^ + diff --git a/slam/Makefile.in b/slam/Makefile.in new file mode 100644 index 000000000..4a1bbf352 --- /dev/null +++ b/slam/Makefile.in @@ -0,0 +1,867 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#---------------------------------------------------------------------------------------------------- +# SLAM and SFM sources +#---------------------------------------------------------------------------------------------------- + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testSimulated2D$(EXEEXT) \ + testSimulated2DOriented$(EXEEXT) testSimulated3D$(EXEEXT) \ + testPose2Factor$(EXEEXT) testPose2Config$(EXEEXT) \ + testPose2SLAM$(EXEEXT) testPose2Prior$(EXEEXT) \ + testPlanarSLAM$(EXEEXT) testPose3Factor$(EXEEXT) \ + testPose3Config$(EXEEXT) testPose3SLAM$(EXEEXT) \ + testVSLAMFactor$(EXEEXT) testVSLAMGraph$(EXEEXT) \ + testVSLAMConfig$(EXEEXT) +@USE_LAPACK_TRUE@am__append_1 = ../spqr_mini/libspqr_mini.la +subdir = slam +DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libslam_la_LIBADD = +am__objects_1 = simulated2D.lo simulated2DOriented.lo Simulated3D.lo \ + pose2SLAM.lo Pose2SLAMOptimizer.lo dataset.lo planarSLAM.lo \ + pose3SLAM.lo visualSLAM.lo GaussianISAM2.lo +am_libslam_la_OBJECTS = $(am__objects_1) +libslam_la_OBJECTS = $(am_libslam_la_OBJECTS) +testPlanarSLAM_SOURCES = testPlanarSLAM.cpp +testPlanarSLAM_OBJECTS = testPlanarSLAM.$(OBJEXT) +testPlanarSLAM_LDADD = $(LDADD) +testPlanarSLAM_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testPose2Config_SOURCES = testPose2Config.cpp +testPose2Config_OBJECTS = testPose2Config.$(OBJEXT) +testPose2Config_LDADD = $(LDADD) +testPose2Config_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testPose2Factor_SOURCES = testPose2Factor.cpp +testPose2Factor_OBJECTS = testPose2Factor.$(OBJEXT) +testPose2Factor_LDADD = $(LDADD) +testPose2Factor_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testPose2Prior_SOURCES = testPose2Prior.cpp +testPose2Prior_OBJECTS = testPose2Prior.$(OBJEXT) +testPose2Prior_LDADD = $(LDADD) +testPose2Prior_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testPose2SLAM_SOURCES = testPose2SLAM.cpp +testPose2SLAM_OBJECTS = testPose2SLAM.$(OBJEXT) +testPose2SLAM_LDADD = $(LDADD) +testPose2SLAM_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testPose3Config_SOURCES = testPose3Config.cpp +testPose3Config_OBJECTS = testPose3Config.$(OBJEXT) +testPose3Config_LDADD = $(LDADD) +testPose3Config_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testPose3Factor_SOURCES = testPose3Factor.cpp +testPose3Factor_OBJECTS = testPose3Factor.$(OBJEXT) +testPose3Factor_LDADD = $(LDADD) +testPose3Factor_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testPose3SLAM_SOURCES = testPose3SLAM.cpp +testPose3SLAM_OBJECTS = testPose3SLAM.$(OBJEXT) +testPose3SLAM_LDADD = $(LDADD) +testPose3SLAM_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testSimulated2D_SOURCES = testSimulated2D.cpp +testSimulated2D_OBJECTS = testSimulated2D.$(OBJEXT) +testSimulated2D_LDADD = $(LDADD) +testSimulated2D_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testSimulated2DOriented_SOURCES = testSimulated2DOriented.cpp +testSimulated2DOriented_OBJECTS = testSimulated2DOriented.$(OBJEXT) +testSimulated2DOriented_LDADD = $(LDADD) +testSimulated2DOriented_DEPENDENCIES = libslam.la \ + ../geometry/libgeometry.la ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testSimulated3D_SOURCES = testSimulated3D.cpp +testSimulated3D_OBJECTS = testSimulated3D.$(OBJEXT) +testSimulated3D_LDADD = $(LDADD) +testSimulated3D_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testVSLAMConfig_SOURCES = testVSLAMConfig.cpp +testVSLAMConfig_OBJECTS = testVSLAMConfig.$(OBJEXT) +testVSLAMConfig_LDADD = $(LDADD) +testVSLAMConfig_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testVSLAMFactor_SOURCES = testVSLAMFactor.cpp +testVSLAMFactor_OBJECTS = testVSLAMFactor.$(OBJEXT) +testVSLAMFactor_LDADD = $(LDADD) +testVSLAMFactor_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +testVSLAMGraph_SOURCES = testVSLAMGraph.cpp +testVSLAMGraph_OBJECTS = testVSLAMGraph.$(OBJEXT) +testVSLAMGraph_LDADD = $(LDADD) +testVSLAMGraph_DEPENDENCIES = libslam.la ../geometry/libgeometry.la \ + ../cpp/libcpp.la ../base/libbase.la \ + ../CppUnitLite/libCppUnitLite.a ../ldl/libldl.la \ + ../colamd/libcolamd.la $(am__append_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libslam_la_SOURCES) testPlanarSLAM.cpp testPose2Config.cpp \ + testPose2Factor.cpp testPose2Prior.cpp testPose2SLAM.cpp \ + testPose3Config.cpp testPose3Factor.cpp testPose3SLAM.cpp \ + testSimulated2D.cpp testSimulated2DOriented.cpp \ + testSimulated3D.cpp testVSLAMConfig.cpp testVSLAMFactor.cpp \ + testVSLAMGraph.cpp +DIST_SOURCES = $(libslam_la_SOURCES) testPlanarSLAM.cpp \ + testPose2Config.cpp testPose2Factor.cpp testPose2Prior.cpp \ + testPose2SLAM.cpp testPose3Config.cpp testPose3Factor.cpp \ + testPose3SLAM.cpp testSimulated2D.cpp \ + testSimulated2DOriented.cpp testSimulated3D.cpp \ + testVSLAMConfig.cpp testVSLAMFactor.cpp testVSLAMGraph.cpp +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +boost = @boost@ +boost_serialization = @boost_serialization@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +toolbox = @toolbox@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# simulated2D example + +# simulated2DOriented example + +# Pose SLAM headers + +# 2D SLAM using Bearing and Range + +#---------------------------------------------------------------------------------------------------- +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +# The headers are installed in $(includedir)/gtsam: +#---------------------------------------------------------------------------------------------------- +headers = Simulated2DConfig.h Simulated2DPosePrior.h \ + Simulated2DPointPrior.h Simulated2DOdometry.h \ + Simulated2DMeasurement.h Simulated2DOrientedConfig.h \ + Simulated2DOrientedPosePrior.h Simulated2DOrientedOdometry.h \ + BetweenFactor.h PriorFactor.h BearingFactor.h RangeFactor.h \ + BearingRangeFactor.h $(sources:.cpp=.h) + +# simulated3D example + +# 2D Pose SLAM + +# 3D Pose constraints + +# Visual SLAM + +# GaussianISAM2 is fairly SLAM-specific +sources = simulated2D.cpp simulated2DOriented.cpp Simulated3D.cpp \ + pose2SLAM.cpp Pose2SLAMOptimizer.cpp dataset.cpp \ + planarSLAM.cpp pose3SLAM.cpp visualSLAM.cpp GaussianISAM2.cpp +pkginclude_HEADERS = $(headers) +noinst_LTLIBRARIES = libslam.la +libslam_la_SOURCES = $(sources) +AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../cpp -I../geometry + +#---------------------------------------------------------------------------------------------------- +# rules to build local programs +#---------------------------------------------------------------------------------------------------- +TESTS = $(check_PROGRAMS) +AM_DEFAULT_SOURCE_EXT = .cpp +AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) +LDADD = libslam.la ../geometry/libgeometry.la ../cpp/libcpp.la \ + ../base/libbase.la ../CppUnitLite/libCppUnitLite.a \ + ../ldl/libldl.la ../colamd/libcolamd.la $(am__append_1) +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu slam/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu slam/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libslam.la: $(libslam_la_OBJECTS) $(libslam_la_DEPENDENCIES) + $(CXXLINK) $(libslam_la_OBJECTS) $(libslam_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testPlanarSLAM$(EXEEXT): $(testPlanarSLAM_OBJECTS) $(testPlanarSLAM_DEPENDENCIES) + @rm -f testPlanarSLAM$(EXEEXT) + $(CXXLINK) $(testPlanarSLAM_OBJECTS) $(testPlanarSLAM_LDADD) $(LIBS) +testPose2Config$(EXEEXT): $(testPose2Config_OBJECTS) $(testPose2Config_DEPENDENCIES) + @rm -f testPose2Config$(EXEEXT) + $(CXXLINK) $(testPose2Config_OBJECTS) $(testPose2Config_LDADD) $(LIBS) +testPose2Factor$(EXEEXT): $(testPose2Factor_OBJECTS) $(testPose2Factor_DEPENDENCIES) + @rm -f testPose2Factor$(EXEEXT) + $(CXXLINK) $(testPose2Factor_OBJECTS) $(testPose2Factor_LDADD) $(LIBS) +testPose2Prior$(EXEEXT): $(testPose2Prior_OBJECTS) $(testPose2Prior_DEPENDENCIES) + @rm -f testPose2Prior$(EXEEXT) + $(CXXLINK) $(testPose2Prior_OBJECTS) $(testPose2Prior_LDADD) $(LIBS) +testPose2SLAM$(EXEEXT): $(testPose2SLAM_OBJECTS) $(testPose2SLAM_DEPENDENCIES) + @rm -f testPose2SLAM$(EXEEXT) + $(CXXLINK) $(testPose2SLAM_OBJECTS) $(testPose2SLAM_LDADD) $(LIBS) +testPose3Config$(EXEEXT): $(testPose3Config_OBJECTS) $(testPose3Config_DEPENDENCIES) + @rm -f testPose3Config$(EXEEXT) + $(CXXLINK) $(testPose3Config_OBJECTS) $(testPose3Config_LDADD) $(LIBS) +testPose3Factor$(EXEEXT): $(testPose3Factor_OBJECTS) $(testPose3Factor_DEPENDENCIES) + @rm -f testPose3Factor$(EXEEXT) + $(CXXLINK) $(testPose3Factor_OBJECTS) $(testPose3Factor_LDADD) $(LIBS) +testPose3SLAM$(EXEEXT): $(testPose3SLAM_OBJECTS) $(testPose3SLAM_DEPENDENCIES) + @rm -f testPose3SLAM$(EXEEXT) + $(CXXLINK) $(testPose3SLAM_OBJECTS) $(testPose3SLAM_LDADD) $(LIBS) +testSimulated2D$(EXEEXT): $(testSimulated2D_OBJECTS) $(testSimulated2D_DEPENDENCIES) + @rm -f testSimulated2D$(EXEEXT) + $(CXXLINK) $(testSimulated2D_OBJECTS) $(testSimulated2D_LDADD) $(LIBS) +testSimulated2DOriented$(EXEEXT): $(testSimulated2DOriented_OBJECTS) $(testSimulated2DOriented_DEPENDENCIES) + @rm -f testSimulated2DOriented$(EXEEXT) + $(CXXLINK) $(testSimulated2DOriented_OBJECTS) $(testSimulated2DOriented_LDADD) $(LIBS) +testSimulated3D$(EXEEXT): $(testSimulated3D_OBJECTS) $(testSimulated3D_DEPENDENCIES) + @rm -f testSimulated3D$(EXEEXT) + $(CXXLINK) $(testSimulated3D_OBJECTS) $(testSimulated3D_LDADD) $(LIBS) +testVSLAMConfig$(EXEEXT): $(testVSLAMConfig_OBJECTS) $(testVSLAMConfig_DEPENDENCIES) + @rm -f testVSLAMConfig$(EXEEXT) + $(CXXLINK) $(testVSLAMConfig_OBJECTS) $(testVSLAMConfig_LDADD) $(LIBS) +testVSLAMFactor$(EXEEXT): $(testVSLAMFactor_OBJECTS) $(testVSLAMFactor_DEPENDENCIES) + @rm -f testVSLAMFactor$(EXEEXT) + $(CXXLINK) $(testVSLAMFactor_OBJECTS) $(testVSLAMFactor_LDADD) $(LIBS) +testVSLAMGraph$(EXEEXT): $(testVSLAMGraph_OBJECTS) $(testVSLAMGraph_DEPENDENCIES) + @rm -f testVSLAMGraph$(EXEEXT) + $(CXXLINK) $(testVSLAMGraph_OBJECTS) $(testVSLAMGraph_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GaussianISAM2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pose2SLAMOptimizer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Simulated3D.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dataset.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/planarSLAM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pose2SLAM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pose3SLAM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simulated2D.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simulated2DOriented.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPlanarSLAM.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPose2Config.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPose2Factor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPose2Prior.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPose2SLAM.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPose3Config.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPose3Factor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPose3SLAM.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSimulated2D.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSimulated2DOriented.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSimulated3D.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVSLAMConfig.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVSLAMFactor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVSLAMGraph.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/visualSLAM.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgincludeHEADERS + + +# rule to run an executable +%.run: % $(LDADD) + ./$^ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cpp/Pose2SLAMOptimizer.cpp b/slam/Pose2SLAMOptimizer.cpp similarity index 100% rename from cpp/Pose2SLAMOptimizer.cpp rename to slam/Pose2SLAMOptimizer.cpp diff --git a/cpp/Pose2SLAMOptimizer.h b/slam/Pose2SLAMOptimizer.h similarity index 100% rename from cpp/Pose2SLAMOptimizer.h rename to slam/Pose2SLAMOptimizer.h diff --git a/cpp/PriorFactor.h b/slam/PriorFactor.h similarity index 100% rename from cpp/PriorFactor.h rename to slam/PriorFactor.h diff --git a/cpp/RangeFactor.h b/slam/RangeFactor.h similarity index 100% rename from cpp/RangeFactor.h rename to slam/RangeFactor.h diff --git a/cpp/Simulated2DConfig.h b/slam/Simulated2DConfig.h similarity index 100% rename from cpp/Simulated2DConfig.h rename to slam/Simulated2DConfig.h diff --git a/cpp/Simulated2DMeasurement.h b/slam/Simulated2DMeasurement.h similarity index 100% rename from cpp/Simulated2DMeasurement.h rename to slam/Simulated2DMeasurement.h diff --git a/slam/Simulated2DOdometry.h b/slam/Simulated2DOdometry.h new file mode 100644 index 000000000..93aca0ce6 --- /dev/null +++ b/slam/Simulated2DOdometry.h @@ -0,0 +1,18 @@ +/* + * Simulated2DOdometry.h + * + * Re-created on Feb 22, 2010 for compatibility with MATLAB + * Author: Frank Dellaert + */ + +#pragma once + +#include "simulated2D.h" +#include "Simulated2DConfig.h" + +namespace gtsam { + + typedef simulated2D::Odometry Simulated2DOdometry; + +} + diff --git a/cpp/Simulated2DOrientedConfig.h b/slam/Simulated2DOrientedConfig.h similarity index 100% rename from cpp/Simulated2DOrientedConfig.h rename to slam/Simulated2DOrientedConfig.h diff --git a/cpp/Simulated2DOrientedOdometry.h b/slam/Simulated2DOrientedOdometry.h similarity index 100% rename from cpp/Simulated2DOrientedOdometry.h rename to slam/Simulated2DOrientedOdometry.h diff --git a/cpp/Simulated2DOrientedPosePrior.h b/slam/Simulated2DOrientedPosePrior.h similarity index 100% rename from cpp/Simulated2DOrientedPosePrior.h rename to slam/Simulated2DOrientedPosePrior.h diff --git a/cpp/Simulated2DPointPrior.h b/slam/Simulated2DPointPrior.h similarity index 100% rename from cpp/Simulated2DPointPrior.h rename to slam/Simulated2DPointPrior.h diff --git a/cpp/Simulated2DPosePrior.h b/slam/Simulated2DPosePrior.h similarity index 100% rename from cpp/Simulated2DPosePrior.h rename to slam/Simulated2DPosePrior.h diff --git a/cpp/Simulated3D.cpp b/slam/Simulated3D.cpp similarity index 100% rename from cpp/Simulated3D.cpp rename to slam/Simulated3D.cpp diff --git a/cpp/Simulated3D.h b/slam/Simulated3D.h similarity index 100% rename from cpp/Simulated3D.h rename to slam/Simulated3D.h diff --git a/cpp/dataset.cpp b/slam/dataset.cpp similarity index 100% rename from cpp/dataset.cpp rename to slam/dataset.cpp diff --git a/cpp/dataset.h b/slam/dataset.h similarity index 100% rename from cpp/dataset.h rename to slam/dataset.h diff --git a/cpp/planarSLAM.cpp b/slam/planarSLAM.cpp similarity index 100% rename from cpp/planarSLAM.cpp rename to slam/planarSLAM.cpp diff --git a/cpp/planarSLAM.h b/slam/planarSLAM.h similarity index 100% rename from cpp/planarSLAM.h rename to slam/planarSLAM.h diff --git a/cpp/pose2SLAM.cpp b/slam/pose2SLAM.cpp similarity index 100% rename from cpp/pose2SLAM.cpp rename to slam/pose2SLAM.cpp diff --git a/cpp/pose2SLAM.h b/slam/pose2SLAM.h similarity index 100% rename from cpp/pose2SLAM.h rename to slam/pose2SLAM.h diff --git a/cpp/pose3SLAM.cpp b/slam/pose3SLAM.cpp similarity index 100% rename from cpp/pose3SLAM.cpp rename to slam/pose3SLAM.cpp diff --git a/cpp/pose3SLAM.h b/slam/pose3SLAM.h similarity index 100% rename from cpp/pose3SLAM.h rename to slam/pose3SLAM.h diff --git a/slam/saveGraph.cpp b/slam/saveGraph.cpp new file mode 100644 index 000000000..858ea56ed --- /dev/null +++ b/slam/saveGraph.cpp @@ -0,0 +1,58 @@ +/* + * saveGraph.cpp + * Author: Richard Roberts + */ + +#include +#include +#include +#include +#include "Ordering.h" +#include "Point2.h" +#include "SymbolicFactorGraph.h" +#include "SymbolicBayesNet.h" +#include "inference-inl.h" +#include "LieConfig-inl.h" + +using namespace std; + +namespace gtsam { + + INSTANTIATE_LIE_CONFIG(Symbol, Point2) + + /* ************************************************************************* */ + void saveGraph(const SymbolicFactorGraph& fg, const SymbolicConfig& config, const std::string& s) { + + Symbol key; + Point2 pt; + float scale = 100; + + string dotfile = s + ".dot"; + ofstream of(dotfile.c_str()); + of << "graph G{" << endl; + of << "bgcolor=\"transparent\";" << endl; + + BOOST_FOREACH(boost::tie(key, pt), config){ + of << (string)key << "[label=\"" << (string)key << "\"][pos=\"" << pt.x()*scale << "," << pt.y()*scale << "\"];" << endl; + } + + int index = 0; + BOOST_FOREACH(const SymbolicFactorGraph::sharedFactor& factor, fg) { + index++; + Point2 center; + BOOST_FOREACH(const Symbol& key, factor->keys()) + center = center + config[key]; + center = Point2(center.x() / factor->keys().size(), center.y() / factor->keys().size()); + of << "f" << index << "[pos=\"" << center.x()*scale << "," << center.y()*scale << "\"][shape=\"point\"];" << endl; + BOOST_FOREACH(const Symbol& key, factor->keys()) + of << "f" << index << "--" << (string)key << endl; + } + of<<"}"; + of.close(); + + string cmd = boost::str(boost::format("neato -s -n -Tpdf %s -o %s.pdf") % dotfile % s); + system(cmd.c_str()); + } + + /* ************************************************************************* */ +} diff --git a/slam/saveGraph.h b/slam/saveGraph.h new file mode 100644 index 000000000..ebed48a27 --- /dev/null +++ b/slam/saveGraph.h @@ -0,0 +1,25 @@ +/* + * h + * Author: Richard Roberts + */ + +#pragma once + +#include +#include +#include "FactorGraph.h" +#include "SymbolicFactor.h" +#include "SymbolicBayesNet.h" +#include "Key.h" +#include "Point2.h" +#include "LieConfig.h" + +namespace gtsam { + + class Point2; + typedef LieConfig SymbolicConfig; + + // save graph to the graphviz format + void saveGraph(const SymbolicFactorGraph& fg, const SymbolicConfig& config, const std::string& s); + +} // namespace gtsam diff --git a/cpp/simulated2D.cpp b/slam/simulated2D.cpp similarity index 100% rename from cpp/simulated2D.cpp rename to slam/simulated2D.cpp diff --git a/cpp/simulated2D.h b/slam/simulated2D.h similarity index 100% rename from cpp/simulated2D.h rename to slam/simulated2D.h diff --git a/cpp/simulated2DOriented.cpp b/slam/simulated2DOriented.cpp similarity index 100% rename from cpp/simulated2DOriented.cpp rename to slam/simulated2DOriented.cpp diff --git a/cpp/simulated2DOriented.h b/slam/simulated2DOriented.h similarity index 96% rename from cpp/simulated2DOriented.h rename to slam/simulated2DOriented.h index c0a70ca19..75b6d2609 100644 --- a/cpp/simulated2DOriented.h +++ b/slam/simulated2DOriented.h @@ -71,7 +71,7 @@ namespace gtsam { GenericOdometry(const Pose2& z, const SharedGaussian& model, const Key& i1, const Key& i2) : - NonlinearFactor2 (model, i1, i2), z_(z) { + z_(z), NonlinearFactor2 (model, i1, i2) { } Vector evaluateError(const Pose2& x1, const Pose2& x2, boost::optional< diff --git a/cpp/testPlanarSLAM.cpp b/slam/testPlanarSLAM.cpp similarity index 100% rename from cpp/testPlanarSLAM.cpp rename to slam/testPlanarSLAM.cpp diff --git a/cpp/testPose2Config.cpp b/slam/testPose2Config.cpp similarity index 100% rename from cpp/testPose2Config.cpp rename to slam/testPose2Config.cpp diff --git a/cpp/testPose2Factor.cpp b/slam/testPose2Factor.cpp similarity index 100% rename from cpp/testPose2Factor.cpp rename to slam/testPose2Factor.cpp diff --git a/cpp/testPose2Prior.cpp b/slam/testPose2Prior.cpp similarity index 100% rename from cpp/testPose2Prior.cpp rename to slam/testPose2Prior.cpp diff --git a/cpp/testPose2SLAM.cpp b/slam/testPose2SLAM.cpp similarity index 100% rename from cpp/testPose2SLAM.cpp rename to slam/testPose2SLAM.cpp diff --git a/cpp/testPose3Config.cpp b/slam/testPose3Config.cpp similarity index 100% rename from cpp/testPose3Config.cpp rename to slam/testPose3Config.cpp diff --git a/cpp/testPose3Factor.cpp b/slam/testPose3Factor.cpp similarity index 100% rename from cpp/testPose3Factor.cpp rename to slam/testPose3Factor.cpp diff --git a/cpp/testPose3SLAM.cpp b/slam/testPose3SLAM.cpp similarity index 100% rename from cpp/testPose3SLAM.cpp rename to slam/testPose3SLAM.cpp diff --git a/cpp/testSimulated2D.cpp b/slam/testSimulated2D.cpp similarity index 100% rename from cpp/testSimulated2D.cpp rename to slam/testSimulated2D.cpp diff --git a/cpp/testSimulated2DOriented.cpp b/slam/testSimulated2DOriented.cpp similarity index 100% rename from cpp/testSimulated2DOriented.cpp rename to slam/testSimulated2DOriented.cpp diff --git a/cpp/testSimulated3D.cpp b/slam/testSimulated3D.cpp similarity index 100% rename from cpp/testSimulated3D.cpp rename to slam/testSimulated3D.cpp diff --git a/cpp/testVSLAMConfig.cpp b/slam/testVSLAMConfig.cpp similarity index 100% rename from cpp/testVSLAMConfig.cpp rename to slam/testVSLAMConfig.cpp diff --git a/cpp/testVSLAMFactor.cpp b/slam/testVSLAMFactor.cpp similarity index 100% rename from cpp/testVSLAMFactor.cpp rename to slam/testVSLAMFactor.cpp diff --git a/cpp/testVSLAMGraph.cpp b/slam/testVSLAMGraph.cpp similarity index 100% rename from cpp/testVSLAMGraph.cpp rename to slam/testVSLAMGraph.cpp diff --git a/cpp/visualSLAM.cpp b/slam/visualSLAM.cpp similarity index 100% rename from cpp/visualSLAM.cpp rename to slam/visualSLAM.cpp diff --git a/cpp/visualSLAM.h b/slam/visualSLAM.h similarity index 100% rename from cpp/visualSLAM.h rename to slam/visualSLAM.h diff --git a/spqr_mini/Makefile.am b/spqr_mini/Makefile.am index 8645f9a64..37f585f57 100644 --- a/spqr_mini/Makefile.am +++ b/spqr_mini/Makefile.am @@ -1,34 +1,23 @@ -# the install destination -includedir = ${prefix}/include/spqr_mini -libdir = ${exec_prefix}/lib +# Only install if LAPACK enabled if USE_LAPACK - sources = cholmod_error.c cholmod_common.c cholmod_memory.c spqr_front.cpp spqr_larftb.cpp - headers = UFconfig.h cholmod_common.h cholmod_internal.h cholmod_blas.h cholmod_core.h - headers += SuiteSparseQR_definitions.h SuiteSparseQR_subset.hpp spqr_subset.hpp spqr_larftb.h spqr_front.h - AM_CXXFLAGS = -fPIC +sources = cholmod_error.c cholmod_common.c cholmod_memory.c spqr_front.cpp spqr_larftb.cpp +headers = UFconfig.h cholmod_common.h cholmod_internal.h cholmod_blas.h cholmod_core.h +headers += SuiteSparseQR_definitions.h SuiteSparseQR_subset.hpp spqr_subset.hpp spqr_larftb.h spqr_front.h - # create both dynamic and static libraries - lib_LTLIBRARIES = libspqr_mini.la - libspqr_mini_la_SOURCES = $(sources) +# Create a libtool library that is not installed +# It will be packaged in the toplevel libgtsam.la as specfied in ../Makefile.am +# The headers are not installed either +noinst_LTLIBRARIES = libspqr_mini.la +libspqr_mini_la_SOURCES = $(sources) +noinst_HEADERS = $(headers) - include_HEADERS = $(headers) +AM_CPPFLAGS = -DDLONG # Compiles cholmod in double/long mode - AM_CXXFLAGS += -DGT_USE_LAPACK -DDLONG - -if USE_VECLIB_MACOS -AM_CXXFLAGS += -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT -I/System/Library/Frameworks/vecLib.framework/Headers -libspqr_mini_la_CPPFLAGS = -DDLONG -DGT_USE_CBLAS -DYA_BLAS -DYA_LAPACK -DYA_BLASMULT -I/System/Library/Frameworks/vecLib.framework/Headers -AM_LDFLAGS = -lcblas -latlas -libspqr_mini_la_LDFLAGS = -framework vecLib -lcblas -latlas -endif - -if USE_LAPACK_LINUX -AM_CXXFLAGS += -DDLONG -DGT_USE_LAPACK -I/usr/include -libspqr_mini_la_CPPFLAGS = -DDLONG -DGT_USE_LAPACK -AM_LDFLAGS = -llapack -libspqr_mini_la_LDFLAGS = -llapack +# On Mac, we compile using the BLAS/LAPACK headers in the Accelerate framework +if USE_ACCELERATE_MACOS +AM_CPPFLAGS += -F Accelerate endif endif diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 000000000..fe63bf7bd --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,36 @@ +#---------------------------------------------------------------------------------------------------- +# GTSAM tests +# More elaborate unit tests that test functionality with slam examples +#---------------------------------------------------------------------------------------------------- + +check_PROGRAMS = testBayesNetPreconditioner testConstraintOptimizer +check_PROGRAMS += testGaussianBayesNet testGaussianFactor testGaussianFactorGraph +check_PROGRAMS += testGaussianISAM testGaussianISAM2 testGraph +check_PROGRAMS += testInference testIterative testJunctionTree +check_PROGRAMS += testNonlinearEquality testNonlinearFactor testNonlinearFactorGraph +check_PROGRAMS += testNonlinearOptimizer testSQP testSubgraphPreconditioner +check_PROGRAMS += testSymbolicBayesNet testSymbolicFactorGraph testTupleConfig + +# Timing tests +noinst_PROGRAMS = timeGaussianFactorGraph + +#---------------------------------------------------------------------------------------------------- +# rules to build local library +#---------------------------------------------------------------------------------------------------- +noinst_HEADERS = smallExample.h +noinst_LIBRARIES = libtests.a +libtests_a_SOURCES = smallExample.cpp +AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../geometry -I../cpp -I../slam + +#---------------------------------------------------------------------------------------------------- +# rules to build unit tests +#---------------------------------------------------------------------------------------------------- +TESTS = $(check_PROGRAMS) +AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) +LDADD = libtests.a ../libgtsam.la ../CppUnitLite/libCppUnitLite.a +AM_DEFAULT_SOURCE_EXT = .cpp + +# rule to run an executable +%.run: % $(LDADD) + ./$^ + diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 000000000..506e3605f --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,837 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#---------------------------------------------------------------------------------------------------- +# GTSAM tests +# More elaborate unit tests that test functionality with slam examples +#---------------------------------------------------------------------------------------------------- + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testBayesNetPreconditioner$(EXEEXT) \ + testConstraintOptimizer$(EXEEXT) testGaussianBayesNet$(EXEEXT) \ + testGaussianFactor$(EXEEXT) testGaussianFactorGraph$(EXEEXT) \ + testGaussianISAM$(EXEEXT) testGaussianISAM2$(EXEEXT) \ + testGraph$(EXEEXT) testInference$(EXEEXT) \ + testIterative$(EXEEXT) testJunctionTree$(EXEEXT) \ + testNonlinearEquality$(EXEEXT) testNonlinearFactor$(EXEEXT) \ + testNonlinearFactorGraph$(EXEEXT) \ + testNonlinearOptimizer$(EXEEXT) testSQP$(EXEEXT) \ + testSubgraphPreconditioner$(EXEEXT) \ + testSymbolicBayesNet$(EXEEXT) testSymbolicFactorGraph$(EXEEXT) \ + testTupleConfig$(EXEEXT) +noinst_PROGRAMS = timeGaussianFactorGraph$(EXEEXT) +subdir = tests +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = smallExample.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) +PROGRAMS = $(noinst_PROGRAMS) +testBayesNetPreconditioner_SOURCES = testBayesNetPreconditioner.cpp +testBayesNetPreconditioner_OBJECTS = \ + testBayesNetPreconditioner.$(OBJEXT) +testBayesNetPreconditioner_LDADD = $(LDADD) +testBayesNetPreconditioner_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testConstraintOptimizer_SOURCES = testConstraintOptimizer.cpp +testConstraintOptimizer_OBJECTS = testConstraintOptimizer.$(OBJEXT) +testConstraintOptimizer_LDADD = $(LDADD) +testConstraintOptimizer_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testGaussianBayesNet_SOURCES = testGaussianBayesNet.cpp +testGaussianBayesNet_OBJECTS = testGaussianBayesNet.$(OBJEXT) +testGaussianBayesNet_LDADD = $(LDADD) +testGaussianBayesNet_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testGaussianFactor_SOURCES = testGaussianFactor.cpp +testGaussianFactor_OBJECTS = testGaussianFactor.$(OBJEXT) +testGaussianFactor_LDADD = $(LDADD) +testGaussianFactor_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testGaussianFactorGraph_SOURCES = testGaussianFactorGraph.cpp +testGaussianFactorGraph_OBJECTS = testGaussianFactorGraph.$(OBJEXT) +testGaussianFactorGraph_LDADD = $(LDADD) +testGaussianFactorGraph_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testGaussianISAM_SOURCES = testGaussianISAM.cpp +testGaussianISAM_OBJECTS = testGaussianISAM.$(OBJEXT) +testGaussianISAM_LDADD = $(LDADD) +testGaussianISAM_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testGaussianISAM2_SOURCES = testGaussianISAM2.cpp +testGaussianISAM2_OBJECTS = testGaussianISAM2.$(OBJEXT) +testGaussianISAM2_LDADD = $(LDADD) +testGaussianISAM2_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testGraph_SOURCES = testGraph.cpp +testGraph_OBJECTS = testGraph.$(OBJEXT) +testGraph_LDADD = $(LDADD) +testGraph_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testInference_SOURCES = testInference.cpp +testInference_OBJECTS = testInference.$(OBJEXT) +testInference_LDADD = $(LDADD) +testInference_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testIterative_SOURCES = testIterative.cpp +testIterative_OBJECTS = testIterative.$(OBJEXT) +testIterative_LDADD = $(LDADD) +testIterative_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testJunctionTree_SOURCES = testJunctionTree.cpp +testJunctionTree_OBJECTS = testJunctionTree.$(OBJEXT) +testJunctionTree_LDADD = $(LDADD) +testJunctionTree_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testNonlinearEquality_SOURCES = testNonlinearEquality.cpp +testNonlinearEquality_OBJECTS = testNonlinearEquality.$(OBJEXT) +testNonlinearEquality_LDADD = $(LDADD) +testNonlinearEquality_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testNonlinearFactor_SOURCES = testNonlinearFactor.cpp +testNonlinearFactor_OBJECTS = testNonlinearFactor.$(OBJEXT) +testNonlinearFactor_LDADD = $(LDADD) +testNonlinearFactor_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testNonlinearFactorGraph_SOURCES = testNonlinearFactorGraph.cpp +testNonlinearFactorGraph_OBJECTS = testNonlinearFactorGraph.$(OBJEXT) +testNonlinearFactorGraph_LDADD = $(LDADD) +testNonlinearFactorGraph_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testNonlinearOptimizer_SOURCES = testNonlinearOptimizer.cpp +testNonlinearOptimizer_OBJECTS = testNonlinearOptimizer.$(OBJEXT) +testNonlinearOptimizer_LDADD = $(LDADD) +testNonlinearOptimizer_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testSQP_SOURCES = testSQP.cpp +testSQP_OBJECTS = testSQP.$(OBJEXT) +testSQP_LDADD = $(LDADD) +testSQP_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testSubgraphPreconditioner_SOURCES = testSubgraphPreconditioner.cpp +testSubgraphPreconditioner_OBJECTS = \ + testSubgraphPreconditioner.$(OBJEXT) +testSubgraphPreconditioner_LDADD = $(LDADD) +testSubgraphPreconditioner_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testSymbolicBayesNet_SOURCES = testSymbolicBayesNet.cpp +testSymbolicBayesNet_OBJECTS = testSymbolicBayesNet.$(OBJEXT) +testSymbolicBayesNet_LDADD = $(LDADD) +testSymbolicBayesNet_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testSymbolicFactorGraph_SOURCES = testSymbolicFactorGraph.cpp +testSymbolicFactorGraph_OBJECTS = testSymbolicFactorGraph.$(OBJEXT) +testSymbolicFactorGraph_LDADD = $(LDADD) +testSymbolicFactorGraph_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +testTupleConfig_SOURCES = testTupleConfig.cpp +testTupleConfig_OBJECTS = testTupleConfig.$(OBJEXT) +testTupleConfig_LDADD = $(LDADD) +testTupleConfig_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +timeGaussianFactorGraph_SOURCES = timeGaussianFactorGraph.cpp +timeGaussianFactorGraph_OBJECTS = timeGaussianFactorGraph.$(OBJEXT) +timeGaussianFactorGraph_LDADD = $(LDADD) +timeGaussianFactorGraph_DEPENDENCIES = libtests.a ../libgtsam.la \ + ../CppUnitLite/libCppUnitLite.a +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libtests_a_SOURCES) testBayesNetPreconditioner.cpp \ + testConstraintOptimizer.cpp testGaussianBayesNet.cpp \ + testGaussianFactor.cpp testGaussianFactorGraph.cpp \ + testGaussianISAM.cpp testGaussianISAM2.cpp testGraph.cpp \ + testInference.cpp testIterative.cpp testJunctionTree.cpp \ + testNonlinearEquality.cpp testNonlinearFactor.cpp \ + testNonlinearFactorGraph.cpp testNonlinearOptimizer.cpp \ + testSQP.cpp testSubgraphPreconditioner.cpp \ + testSymbolicBayesNet.cpp testSymbolicFactorGraph.cpp \ + testTupleConfig.cpp timeGaussianFactorGraph.cpp +DIST_SOURCES = $(libtests_a_SOURCES) testBayesNetPreconditioner.cpp \ + testConstraintOptimizer.cpp testGaussianBayesNet.cpp \ + testGaussianFactor.cpp testGaussianFactorGraph.cpp \ + testGaussianISAM.cpp testGaussianISAM2.cpp testGraph.cpp \ + testInference.cpp testIterative.cpp testJunctionTree.cpp \ + testNonlinearEquality.cpp testNonlinearFactor.cpp \ + testNonlinearFactorGraph.cpp testNonlinearOptimizer.cpp \ + testSQP.cpp testSubgraphPreconditioner.cpp \ + testSymbolicBayesNet.cpp testSymbolicFactorGraph.cpp \ + testTupleConfig.cpp timeGaussianFactorGraph.cpp +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +boost = @boost@ +boost_serialization = @boost_serialization@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +toolbox = @toolbox@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +#---------------------------------------------------------------------------------------------------- +# rules to build local library +#---------------------------------------------------------------------------------------------------- +noinst_HEADERS = smallExample.h +noinst_LIBRARIES = libtests.a +libtests_a_SOURCES = smallExample.cpp +AM_CPPFLAGS = -I$(boost) -I../colamd -I../base -I../geometry -I../cpp -I../slam + +#---------------------------------------------------------------------------------------------------- +# rules to build unit tests +#---------------------------------------------------------------------------------------------------- +TESTS = $(check_PROGRAMS) +AM_LDFLAGS = $(BOOST_LDFLAGS) $(boost_serialization) +LDADD = libtests.a ../libgtsam.la ../CppUnitLite/libCppUnitLite.a +AM_DEFAULT_SOURCE_EXT = .cpp +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) + -rm -f libtests.a + $(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(RANLIB) libtests.a + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testBayesNetPreconditioner$(EXEEXT): $(testBayesNetPreconditioner_OBJECTS) $(testBayesNetPreconditioner_DEPENDENCIES) + @rm -f testBayesNetPreconditioner$(EXEEXT) + $(CXXLINK) $(testBayesNetPreconditioner_OBJECTS) $(testBayesNetPreconditioner_LDADD) $(LIBS) +testConstraintOptimizer$(EXEEXT): $(testConstraintOptimizer_OBJECTS) $(testConstraintOptimizer_DEPENDENCIES) + @rm -f testConstraintOptimizer$(EXEEXT) + $(CXXLINK) $(testConstraintOptimizer_OBJECTS) $(testConstraintOptimizer_LDADD) $(LIBS) +testGaussianBayesNet$(EXEEXT): $(testGaussianBayesNet_OBJECTS) $(testGaussianBayesNet_DEPENDENCIES) + @rm -f testGaussianBayesNet$(EXEEXT) + $(CXXLINK) $(testGaussianBayesNet_OBJECTS) $(testGaussianBayesNet_LDADD) $(LIBS) +testGaussianFactor$(EXEEXT): $(testGaussianFactor_OBJECTS) $(testGaussianFactor_DEPENDENCIES) + @rm -f testGaussianFactor$(EXEEXT) + $(CXXLINK) $(testGaussianFactor_OBJECTS) $(testGaussianFactor_LDADD) $(LIBS) +testGaussianFactorGraph$(EXEEXT): $(testGaussianFactorGraph_OBJECTS) $(testGaussianFactorGraph_DEPENDENCIES) + @rm -f testGaussianFactorGraph$(EXEEXT) + $(CXXLINK) $(testGaussianFactorGraph_OBJECTS) $(testGaussianFactorGraph_LDADD) $(LIBS) +testGaussianISAM$(EXEEXT): $(testGaussianISAM_OBJECTS) $(testGaussianISAM_DEPENDENCIES) + @rm -f testGaussianISAM$(EXEEXT) + $(CXXLINK) $(testGaussianISAM_OBJECTS) $(testGaussianISAM_LDADD) $(LIBS) +testGaussianISAM2$(EXEEXT): $(testGaussianISAM2_OBJECTS) $(testGaussianISAM2_DEPENDENCIES) + @rm -f testGaussianISAM2$(EXEEXT) + $(CXXLINK) $(testGaussianISAM2_OBJECTS) $(testGaussianISAM2_LDADD) $(LIBS) +testGraph$(EXEEXT): $(testGraph_OBJECTS) $(testGraph_DEPENDENCIES) + @rm -f testGraph$(EXEEXT) + $(CXXLINK) $(testGraph_OBJECTS) $(testGraph_LDADD) $(LIBS) +testInference$(EXEEXT): $(testInference_OBJECTS) $(testInference_DEPENDENCIES) + @rm -f testInference$(EXEEXT) + $(CXXLINK) $(testInference_OBJECTS) $(testInference_LDADD) $(LIBS) +testIterative$(EXEEXT): $(testIterative_OBJECTS) $(testIterative_DEPENDENCIES) + @rm -f testIterative$(EXEEXT) + $(CXXLINK) $(testIterative_OBJECTS) $(testIterative_LDADD) $(LIBS) +testJunctionTree$(EXEEXT): $(testJunctionTree_OBJECTS) $(testJunctionTree_DEPENDENCIES) + @rm -f testJunctionTree$(EXEEXT) + $(CXXLINK) $(testJunctionTree_OBJECTS) $(testJunctionTree_LDADD) $(LIBS) +testNonlinearEquality$(EXEEXT): $(testNonlinearEquality_OBJECTS) $(testNonlinearEquality_DEPENDENCIES) + @rm -f testNonlinearEquality$(EXEEXT) + $(CXXLINK) $(testNonlinearEquality_OBJECTS) $(testNonlinearEquality_LDADD) $(LIBS) +testNonlinearFactor$(EXEEXT): $(testNonlinearFactor_OBJECTS) $(testNonlinearFactor_DEPENDENCIES) + @rm -f testNonlinearFactor$(EXEEXT) + $(CXXLINK) $(testNonlinearFactor_OBJECTS) $(testNonlinearFactor_LDADD) $(LIBS) +testNonlinearFactorGraph$(EXEEXT): $(testNonlinearFactorGraph_OBJECTS) $(testNonlinearFactorGraph_DEPENDENCIES) + @rm -f testNonlinearFactorGraph$(EXEEXT) + $(CXXLINK) $(testNonlinearFactorGraph_OBJECTS) $(testNonlinearFactorGraph_LDADD) $(LIBS) +testNonlinearOptimizer$(EXEEXT): $(testNonlinearOptimizer_OBJECTS) $(testNonlinearOptimizer_DEPENDENCIES) + @rm -f testNonlinearOptimizer$(EXEEXT) + $(CXXLINK) $(testNonlinearOptimizer_OBJECTS) $(testNonlinearOptimizer_LDADD) $(LIBS) +testSQP$(EXEEXT): $(testSQP_OBJECTS) $(testSQP_DEPENDENCIES) + @rm -f testSQP$(EXEEXT) + $(CXXLINK) $(testSQP_OBJECTS) $(testSQP_LDADD) $(LIBS) +testSubgraphPreconditioner$(EXEEXT): $(testSubgraphPreconditioner_OBJECTS) $(testSubgraphPreconditioner_DEPENDENCIES) + @rm -f testSubgraphPreconditioner$(EXEEXT) + $(CXXLINK) $(testSubgraphPreconditioner_OBJECTS) $(testSubgraphPreconditioner_LDADD) $(LIBS) +testSymbolicBayesNet$(EXEEXT): $(testSymbolicBayesNet_OBJECTS) $(testSymbolicBayesNet_DEPENDENCIES) + @rm -f testSymbolicBayesNet$(EXEEXT) + $(CXXLINK) $(testSymbolicBayesNet_OBJECTS) $(testSymbolicBayesNet_LDADD) $(LIBS) +testSymbolicFactorGraph$(EXEEXT): $(testSymbolicFactorGraph_OBJECTS) $(testSymbolicFactorGraph_DEPENDENCIES) + @rm -f testSymbolicFactorGraph$(EXEEXT) + $(CXXLINK) $(testSymbolicFactorGraph_OBJECTS) $(testSymbolicFactorGraph_LDADD) $(LIBS) +testTupleConfig$(EXEEXT): $(testTupleConfig_OBJECTS) $(testTupleConfig_DEPENDENCIES) + @rm -f testTupleConfig$(EXEEXT) + $(CXXLINK) $(testTupleConfig_OBJECTS) $(testTupleConfig_LDADD) $(LIBS) +timeGaussianFactorGraph$(EXEEXT): $(timeGaussianFactorGraph_OBJECTS) $(timeGaussianFactorGraph_DEPENDENCIES) + @rm -f timeGaussianFactorGraph$(EXEEXT) + $(CXXLINK) $(timeGaussianFactorGraph_OBJECTS) $(timeGaussianFactorGraph_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smallExample.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testBayesNetPreconditioner.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testConstraintOptimizer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testGaussianBayesNet.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testGaussianFactor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testGaussianFactorGraph.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testGaussianISAM.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testGaussianISAM2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testGraph.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testInference.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testIterative.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testJunctionTree.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testNonlinearEquality.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testNonlinearFactor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testNonlinearFactorGraph.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testNonlinearOptimizer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSQP.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSubgraphPreconditioner.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSymbolicBayesNet.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSymbolicFactorGraph.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testTupleConfig.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeGaussianFactorGraph.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLIBRARIES clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +# rule to run an executable +%.run: % $(LDADD) + ./$^ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cpp/smallExample.cpp b/tests/smallExample.cpp similarity index 100% rename from cpp/smallExample.cpp rename to tests/smallExample.cpp diff --git a/cpp/smallExample.h b/tests/smallExample.h similarity index 100% rename from cpp/smallExample.h rename to tests/smallExample.h diff --git a/tests/testBayesNetPreconditioner.cpp b/tests/testBayesNetPreconditioner.cpp new file mode 100644 index 000000000..0e443bb08 --- /dev/null +++ b/tests/testBayesNetPreconditioner.cpp @@ -0,0 +1,90 @@ +/** + * @file testBayesNetConditioner.cpp + * @brief Unit tests for BayesNetConditioner + * @author Frank Dellaert + **/ + +#include +#include +#include + +#define GTSAM_MAGIC_KEY + +#include "Ordering.h" +#include "BayesNetPreconditioner.h" +#include "iterative-inl.h" + +using namespace std; +using namespace gtsam; + +#include "smallExample.h" +using namespace example; + +/* ************************************************************************* */ +TEST( BayesNetPreconditioner, conjugateGradients ) +{ + // Build a planar graph + GaussianFactorGraph Ab; + VectorConfig xtrue; + size_t N = 3; + boost::tie(Ab, xtrue) = planarGraph(N); // A*x-b + + // Get the spanning tree and corresponding ordering + GaussianFactorGraph Ab1, Ab2; // A1*x-b1 and A2*x-b2 + boost::tie(Ab1, Ab2) = splitOffPlanarTree(N, Ab); + + // Eliminate the spanning tree to build a prior + Ordering ordering = planarOrdering(N); + GaussianBayesNet Rc1 = Ab1.eliminate(ordering); // R1*x-c1 + VectorConfig xbar = optimize(Rc1); // xbar = inv(R1)*c1 + + // Create BayesNet-preconditioned system + BayesNetPreconditioner system(Ab,Rc1); + + // Create zero config y0 and perturbed config y1 + VectorConfig y0; + Vector z2 = zero(2); + BOOST_FOREACH(const Symbol& j, ordering) y0.insert(j,z2); + + VectorConfig y1 = y0; + y1["x2003"] = Vector_(2, 1.0, -1.0); + VectorConfig x1 = system.x(y1); + + // Check gradient for y0 + VectorConfig expectedGradient0; + expectedGradient0.insert("x1001", Vector_(2,-1000.,-1000.)); + expectedGradient0.insert("x1002", Vector_(2, 0., -300.)); + expectedGradient0.insert("x1003", Vector_(2, 0., -300.)); + expectedGradient0.insert("x2001", Vector_(2, -100., 200.)); + expectedGradient0.insert("x2002", Vector_(2, -100., 0.)); + expectedGradient0.insert("x2003", Vector_(2, -100., -200.)); + expectedGradient0.insert("x3001", Vector_(2, -100., 100.)); + expectedGradient0.insert("x3002", Vector_(2, -100., 0.)); + expectedGradient0.insert("x3003", Vector_(2, -100., -100.)); + VectorConfig actualGradient0 = system.gradient(y0); + CHECK(assert_equal(expectedGradient0,actualGradient0)); +#ifdef VECTORBTREE + CHECK(actualGradient0.cloned(y0)); +#endif + + // Solve using PCG + bool verbose = false; + double epsilon = 1e-6; // had to crank this down !!! + size_t maxIterations = 100; + VectorConfig actual_y = gtsam::conjugateGradients(system, y1, verbose, epsilon, epsilon, maxIterations); + VectorConfig actual_x = system.x(actual_y); + CHECK(assert_equal(xtrue,actual_x)); + + // Compare with non preconditioned version: + VectorConfig actual2 = conjugateGradientDescent(Ab, x1, verbose, epsilon, + maxIterations); + CHECK(assert_equal(xtrue,actual2)); +} + +/* ************************************************************************* */ +int main() { + TestResult tr; + return TestRegistry::runAllTests(tr); +} +/* ************************************************************************* */ diff --git a/tests/testConstraintOptimizer.cpp b/tests/testConstraintOptimizer.cpp new file mode 100644 index 000000000..7f93585d6 --- /dev/null +++ b/tests/testConstraintOptimizer.cpp @@ -0,0 +1,107 @@ +/** + * @file testConstraintOptimizer.cpp + * @brief Tests the optimization engine for SQP and BFGS Quadratic programming techniques + * @author Alex Cunningham + */ + +#include +#include + +#include +#include + +#include + +#include +#include + +#define GTSAM_MAGIC_KEY + +#include // for operator += +using namespace boost::assign; + +using namespace std; +using namespace gtsam; + +#include +using namespace example; + +/* ************************************************************************* */ +TEST( matrix, unconstrained_fg_ata ) { + // create a graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + Matrix A; Vector b; + Ordering ordering; + ordering += Symbol('l', 1), Symbol('x', 1), Symbol('x', 2); + boost::tie(A, b) = fg.matrix(ordering); + Matrix B_ata = prod(trans(A), A); + + // solve subproblem + Vector actual = solve_ldl(B_ata, prod(trans(A), b)); + + // verify + Vector expected = createCorrectDelta().vector(); + CHECK(assert_equal(expected,actual)); +} + +///* ************************************************************************* */ +//TEST( matrix, unconstrained_fg ) { +// // create a graph +// GaussianFactorGraph fg = createGaussianFactorGraph(); +// +// Matrix A; Vector b; +// Ordering ordering; +// ordering += Symbol('l', 1), Symbol('x', 1), Symbol('x', 2); +// boost::tie(A, b) = fg.matrix(ordering); +// Matrix B_ata = prod(trans(A), A); +//// print(B_ata, "B_ata"); +//// print(b, " b"); +// +// // parameters +// size_t maxIt = 50; +// double stepsize = 0.1; +// +// // iterate to solve +// VectorConfig x = createZeroDelta(); +// BFGSEstimator B(x.dim()); +// +// Vector step; +// +// for (size_t i=0; i0) { +// B.update(dfx, step); +// } else { +// B.update(dfx); +// } +// +// // solve subproblem +//// print(B.getB(), " B_bfgs"); +// Vector delta = solve_ldl(B.getB(), -dfx); +//// Vector delta = solve_ldl(B_ata, -dfx); +// +//// print(delta, " delta"); +// +// // update +// step = stepsize * delta; +//// step = linesearch(x, delta, penalty); // TODO: switch here +// x = expmap(x, step); +//// print(step, " step"); +// } +// +// // verify +// VectorConfig expected = createCorrectDelta(); +// CHECK(assert_equal(expected,x, 1e-4)); +//} + +/* ************************************************************************* */ +int main() { TestResult tr; return TestRegistry::runAllTests(tr); } +/* ************************************************************************* */ diff --git a/cpp/testGaussianBayesNet.cpp b/tests/testGaussianBayesNet.cpp similarity index 100% rename from cpp/testGaussianBayesNet.cpp rename to tests/testGaussianBayesNet.cpp diff --git a/tests/testGaussianFactor.cpp b/tests/testGaussianFactor.cpp new file mode 100644 index 000000000..7892c8ff0 --- /dev/null +++ b/tests/testGaussianFactor.cpp @@ -0,0 +1,379 @@ +/** + * @file testGaussianFactor.cpp + * @brief Unit tests for Linear Factor + * @author Christian Potthast + * @author Frank Dellaert + **/ + +#include + +#include +#include // for operator += +#include +#include // for insert +using namespace boost::assign; + +#include + +#define GTSAM_MAGIC_KEY + +#include "Matrix.h" +#include "Ordering.h" +#include "GaussianConditional.h" +#include "inference-inl.h" +#include "smallExample.h" + +using namespace std; +using namespace gtsam; +using namespace example; +using namespace boost; + +static SharedDiagonal + sigma0_1 = sharedSigma(2,0.1), sigma_02 = sharedSigma(2,0.2), + constraintModel = noiseModel::Constrained::All(2); + +/* ************************************************************************* */ +TEST( GaussianFactor, linearFactor ) +{ + Matrix I = eye(2); + Vector b = Vector_(2, 2.0, -1.0); + GaussianFactor expected("x1", -10*I,"x2", 10*I, b, noiseModel::Unit::Create(2)); + + // create a small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // get the factor "f2" from the factor graph + GaussianFactor::shared_ptr lf = fg[1]; + + // check if the two factors are the same + CHECK(assert_equal(expected,*lf)); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, keys ) +{ + // get the factor "f2" from the small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + GaussianFactor::shared_ptr lf = fg[1]; + list expected; + expected.push_back("x1"); + expected.push_back("x2"); + CHECK(lf->keys() == expected); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, dimensions ) +{ + // get the factor "f2" from the small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // Check a single factor + Dimensions expected; + insert(expected)("x1", 2)("x2", 2); + Dimensions actual = fg[1]->dimensions(); + CHECK(expected==actual); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, getDim ) +{ + // get a factor + GaussianFactorGraph fg = createGaussianFactorGraph(); + GaussianFactor::shared_ptr factor = fg[0]; + + // get the size of a variable + size_t actual = factor->getDim("x1"); + + // verify + size_t expected = 2; + CHECK(actual == expected); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, combine ) +{ + // create a small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // get two factors from it and insert the factors into a vector + vector lfg; + lfg.push_back(fg[4 - 1]); + lfg.push_back(fg[2 - 1]); + + // combine in a factor + GaussianFactor combined(lfg); + + // sigmas + double sigma2 = 0.1; + double sigma4 = 0.2; + Vector sigmas = Vector_(4, sigma4, sigma4, sigma2, sigma2); + + // the expected combined linear factor + Matrix Ax2 = Matrix_(4, 2, // x2 + -5., 0., + +0., -5., + 10., 0., + +0., 10.); + + Matrix Al1 = Matrix_(4, 2, // l1 + 5., 0., + 0., 5., + 0., 0., + 0., 0.); + + Matrix Ax1 = Matrix_(4, 2, // x1 + 0.00, 0., // f4 + 0.00, 0., // f4 + -10., 0., // f2 + 0.00, -10. // f2 + ); + + // the RHS + Vector b2(4); + b2(0) = -1.0; + b2(1) = 1.5; + b2(2) = 2.0; + b2(3) = -1.0; + + // use general constructor for making arbitrary factors + vector > meas; + meas.push_back(make_pair("x2", Ax2)); + meas.push_back(make_pair("l1", Al1)); + meas.push_back(make_pair("x1", Ax1)); + GaussianFactor expected(meas, b2, noiseModel::Diagonal::Sigmas(ones(4))); + CHECK(assert_equal(expected,combined)); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, error ) +{ + // create a small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // get the first factor from the factor graph + GaussianFactor::shared_ptr lf = fg[0]; + + // check the error of the first factor with noisy config + VectorConfig cfg = createZeroDelta(); + + // calculate the error from the factor "f1" + // note the error is the same as in testNonlinearFactor + double actual = lf->error(cfg); + DOUBLES_EQUAL( 1.0, actual, 0.00000001 ); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, eliminate ) +{ + // create a small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // get two factors from it and insert the factors into a vector + vector lfg; + lfg.push_back(fg[4 - 1]); + lfg.push_back(fg[2 - 1]); + + // combine in a factor + GaussianFactor combined(lfg); + + // eliminate the combined factor + GaussianConditional::shared_ptr actualCG; + GaussianFactor::shared_ptr actualLF; + boost::tie(actualCG,actualLF) = combined.eliminate("x2"); + + // create expected Conditional Gaussian + Matrix I = eye(2)*sqrt(125.0); + Matrix R11 = I, S12 = -0.2*I, S13 = -0.8*I; + Vector d = I*Vector_(2,0.2,-0.14); + + // Check the conditional Gaussian + GaussianConditional + expectedCG("x2", d, R11, "l1", S12, "x1", S13, repeat(2, 1.0)); + + // the expected linear factor + I = eye(2)/0.2236; + Matrix Bl1 = I, Bx1 = -I; + Vector b1 = I*Vector_(2,0.0,0.2); + + GaussianFactor expectedLF("l1", Bl1, "x1", Bx1, b1, repeat(2,1.0)); + + // check if the result matches + CHECK(assert_equal(expectedCG,*actualCG,1e-3)); + CHECK(assert_equal(expectedLF,*actualLF,1e-3)); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, matrix ) +{ + // create a small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // get the factor "f2" from the factor graph + //GaussianFactor::shared_ptr lf = fg[1]; // NOTE: using the older version + Vector b2 = Vector_(2, 0.2, -0.1); + Matrix I = eye(2); + GaussianFactor::shared_ptr lf(new GaussianFactor("x1", -I, "x2", I, b2, sigma0_1)); + + // render with a given ordering + Ordering ord; + ord += "x1","x2"; + + // Test whitened version + Matrix A_act1; Vector b_act1; + boost::tie(A_act1,b_act1) = lf->matrix(ord, true); + + Matrix A1 = Matrix_(2,4, + -10.0, 0.0, 10.0, 0.0, + 000.0,-10.0, 0.0, 10.0 ); + Vector b1 = Vector_(2, 2.0, -1.0); + + EQUALITY(A_act1,A1); + EQUALITY(b_act1,b1); + + // Test unwhitened version + Matrix A_act2; Vector b_act2; + boost::tie(A_act2,b_act2) = lf->matrix(ord, false); + + + Matrix A2 = Matrix_(2,4, + -1.0, 0.0, 1.0, 0.0, + 000.0,-1.0, 0.0, 1.0 ); + //Vector b2 = Vector_(2, 2.0, -1.0); + + EQUALITY(A_act2,A2); + EQUALITY(b_act2,b2); + + // Ensure that whitening is consistent + shared_ptr model = lf->get_model(); + model->WhitenSystem(A_act2, b_act2); + EQUALITY(A_act1, A_act2); + EQUALITY(b_act1, b_act2); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, matrix_aug ) +{ + // create a small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // get the factor "f2" from the factor graph + //GaussianFactor::shared_ptr lf = fg[1]; + Vector b2 = Vector_(2, 0.2, -0.1); + Matrix I = eye(2); + GaussianFactor::shared_ptr lf(new GaussianFactor("x1", -I, "x2", I, b2, sigma0_1)); + + // render with a given ordering + Ordering ord; + ord += "x1","x2"; + + // Test unwhitened version + Matrix Ab_act1; + Ab_act1 = lf->matrix_augmented(ord, false); + + Matrix Ab1 = Matrix_(2,5, + -1.0, 0.0, 1.0, 0.0, 0.2, + 00.0,- 1.0, 0.0, 1.0, -0.1 ); + + EQUALITY(Ab_act1,Ab1); + + // Test whitened version + Matrix Ab_act2; + Ab_act2 = lf->matrix_augmented(ord, true); + + Matrix Ab2 = Matrix_(2,5, + -10.0, 0.0, 10.0, 0.0, 2.0, + 00.0, -10.0, 0.0, 10.0, -1.0 ); + + EQUALITY(Ab_act2,Ab2); + + // Ensure that whitening is consistent + shared_ptr model = lf->get_model(); + model->WhitenInPlace(Ab_act1); + EQUALITY(Ab_act1, Ab_act2); +} + +/* ************************************************************************* */ +// small aux. function to print out lists of anything +template +void print(const list& i) { + copy(i.begin(), i.end(), ostream_iterator (cout, ",")); + cout << endl; +} + +/* ************************************************************************* */ +TEST( GaussianFactor, sparse ) +{ + // create a small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // get the factor "f2" from the factor graph + GaussianFactor::shared_ptr lf = fg[1]; + + // render with a given ordering + Ordering ord; + ord += "x1","x2"; + + list i,j; + list s; + boost::tie(i,j,s) = lf->sparse(fg.columnIndices(ord)); + + list i1,j1; + i1 += 1,2,1,2; + j1 += 1,2,3,4; + + list s1; + s1 += -10,-10,10,10; + + CHECK(i==i1); + CHECK(j==j1); + CHECK(s==s1); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, sparse2 ) +{ + // create a small linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // get the factor "f2" from the factor graph + GaussianFactor::shared_ptr lf = fg[1]; + + // render with a given ordering + Ordering ord; + ord += "x2","l1","x1"; + + list i,j; + list s; + boost::tie(i,j,s) = lf->sparse(fg.columnIndices(ord)); + + list i1,j1; + i1 += 1,2,1,2; + j1 += 5,6,1,2; + + list s1; + s1 += -10,-10,10,10; + + CHECK(i==i1); + CHECK(j==j1); + CHECK(s==s1); +} + +/* ************************************************************************* */ +TEST( GaussianFactor, size ) +{ + // create a linear factor graph + GaussianFactorGraph fg = createGaussianFactorGraph(); + + // get some factors from the graph + boost::shared_ptr factor1 = fg[0]; + boost::shared_ptr factor2 = fg[1]; + boost::shared_ptr factor3 = fg[2]; + + CHECK(factor1->size() == 1); + CHECK(factor2->size() == 2); + CHECK(factor3->size() == 2); +} + +/* ************************************************************************* */ +int main() { TestResult tr; return TestRegistry::runAllTests(tr);} +/* ************************************************************************* */ diff --git a/cpp/testGaussianFactorGraph.cpp b/tests/testGaussianFactorGraph.cpp similarity index 100% rename from cpp/testGaussianFactorGraph.cpp rename to tests/testGaussianFactorGraph.cpp diff --git a/cpp/testGaussianISAM.cpp b/tests/testGaussianISAM.cpp similarity index 100% rename from cpp/testGaussianISAM.cpp rename to tests/testGaussianISAM.cpp diff --git a/cpp/testGaussianISAM2.cpp b/tests/testGaussianISAM2.cpp similarity index 99% rename from cpp/testGaussianISAM2.cpp rename to tests/testGaussianISAM2.cpp index 4999d1904..4c6cc316b 100644 --- a/cpp/testGaussianISAM2.cpp +++ b/tests/testGaussianISAM2.cpp @@ -14,7 +14,6 @@ using namespace boost::assign; #include "Ordering.h" #include "GaussianBayesNet.h" -#include "ISAM2-inl.h" #include "GaussianISAM2.h" #include "smallExample.h" diff --git a/cpp/testGraph.cpp b/tests/testGraph.cpp similarity index 100% rename from cpp/testGraph.cpp rename to tests/testGraph.cpp diff --git a/cpp/testInference.cpp b/tests/testInference.cpp similarity index 100% rename from cpp/testInference.cpp rename to tests/testInference.cpp diff --git a/cpp/testIterative.cpp b/tests/testIterative.cpp similarity index 100% rename from cpp/testIterative.cpp rename to tests/testIterative.cpp diff --git a/tests/testJunctionTree.cpp b/tests/testJunctionTree.cpp new file mode 100644 index 000000000..84c8b30f2 --- /dev/null +++ b/tests/testJunctionTree.cpp @@ -0,0 +1,85 @@ +/* + * testJunctionTree.cpp + * + * Created on: Jul 8, 2010 + * Author: nikai + * Description: + */ + +#include +#include + +#include +#include // for operator += +#include // for operator += +using namespace boost::assign; + +#define GTSAM_MAGIC_KEY + +#include "smallExample.h" +#include "JunctionTree-inl.h" + +using namespace std; +using namespace gtsam; +using namespace example; + +/* ************************************************************************* * + Bayes tree for smoother with "nested dissection" ordering: + C1 x5 x6 x4 + C2 x3 x2 : x4 + C3 x1 : x2 + C4 x7 : x6 +/* ************************************************************************* */ +TEST( GaussianFactorGraph, constructor2 ) +{ + // create a graph + GaussianFactorGraph fg = createSmoother(7); + + // create an ordering + Ordering ordering; ordering += "x1","x3","x5","x7","x2","x6","x4"; + + GaussianJunctionTree junctionTree(fg, ordering); + Ordering frontal1; frontal1 += "x5", "x6", "x4"; + Ordering frontal2; frontal2 += "x3", "x2"; + Ordering frontal3; frontal3 += "x1"; + Ordering frontal4; frontal4 += "x7"; + Unordered sep1; + Unordered sep2; sep2 += "x4"; + Unordered sep3; sep3 += "x2"; + Unordered sep4; sep4 += "x6"; + CHECK(assert_equal(frontal1, junctionTree.root()->frontal())); + CHECK(assert_equal(sep1, junctionTree.root()->separator())); + LONGS_EQUAL(5, junctionTree.root()->size()); + CHECK(assert_equal(frontal2, junctionTree.root()->children()[0]->frontal())); + CHECK(assert_equal(sep2, junctionTree.root()->children()[0]->separator())); + LONGS_EQUAL(4, junctionTree.root()->children()[0]->size()); + CHECK(assert_equal(frontal3, junctionTree.root()->children()[0]->children()[0]->frontal())); + CHECK(assert_equal(sep3, junctionTree.root()->children()[0]->children()[0]->separator())); + LONGS_EQUAL(2, junctionTree.root()->children()[0]->children()[0]->size()); + CHECK(assert_equal(frontal4, junctionTree.root()->children()[1]->frontal())); + CHECK(assert_equal(sep4, junctionTree.root()->children()[1]->separator())); + LONGS_EQUAL(2, junctionTree.root()->children()[1]->size()); +} + +/* ************************************************************************* * +TEST( GaussianFactorGraph, optimizeMultiFrontal ) +{ + // create a graph + GaussianFactorGraph fg = createSmoother(7); + + // create an ordering + Ordering ordering; ordering += "x1","x3","x5","x7","x2","x6","x4"; + + // optimize the graph + GaussianJunctionTree junctionTree(fg, ordering); + VectorConfig actual = junctionTree.optimize(); + + // verify +// VectorConfig expected = createCorrectDelta(); +// +// CHECK(assert_equal(expected,actual)); +} + +/* ************************************************************************* */ +int main() { TestResult tr; return TestRegistry::runAllTests(tr);} +/* ************************************************************************* */ diff --git a/cpp/testNonlinearEquality.cpp b/tests/testNonlinearEquality.cpp similarity index 100% rename from cpp/testNonlinearEquality.cpp rename to tests/testNonlinearEquality.cpp diff --git a/cpp/testNonlinearFactor.cpp b/tests/testNonlinearFactor.cpp similarity index 100% rename from cpp/testNonlinearFactor.cpp rename to tests/testNonlinearFactor.cpp diff --git a/cpp/testNonlinearFactorGraph.cpp b/tests/testNonlinearFactorGraph.cpp similarity index 100% rename from cpp/testNonlinearFactorGraph.cpp rename to tests/testNonlinearFactorGraph.cpp diff --git a/cpp/testNonlinearOptimizer.cpp b/tests/testNonlinearOptimizer.cpp similarity index 100% rename from cpp/testNonlinearOptimizer.cpp rename to tests/testNonlinearOptimizer.cpp diff --git a/cpp/testSQP.cpp b/tests/testSQP.cpp similarity index 100% rename from cpp/testSQP.cpp rename to tests/testSQP.cpp diff --git a/cpp/testSubgraphPreconditioner.cpp b/tests/testSubgraphPreconditioner.cpp similarity index 100% rename from cpp/testSubgraphPreconditioner.cpp rename to tests/testSubgraphPreconditioner.cpp diff --git a/tests/testSymbolicBayesNet.cpp b/tests/testSymbolicBayesNet.cpp new file mode 100644 index 000000000..f99f3adfe --- /dev/null +++ b/tests/testSymbolicBayesNet.cpp @@ -0,0 +1,59 @@ +/** + * @file testSymbolicBayesNet.cpp + * @brief Unit tests for a symbolic Bayes chain + * @author Frank Dellaert + */ + +#include // for 'insert()' +#include // for operator += +using namespace boost::assign; + +#include + +#define GTSAM_MAGIC_KEY + +#include "Ordering.h" +#include "smallExample.h" +#include "SymbolicBayesNet.h" +#include "SymbolicFactorGraph.h" + +using namespace std; +using namespace gtsam; +using namespace example; + +Symbol _B_('B', 0), _L_('L', 0); +SymbolicConditional::shared_ptr + B(new SymbolicConditional(_B_)), + L(new SymbolicConditional(_L_, _B_)); + +/* ************************************************************************* */ +TEST( SymbolicBayesNet, constructor ) +{ + // Create manually + SymbolicConditional::shared_ptr + x2(new SymbolicConditional("x2","l1", "x1")), + l1(new SymbolicConditional("l1","x1")), + x1(new SymbolicConditional("x1")); + SymbolicBayesNet expected; + expected.push_back(x2); + expected.push_back(l1); + expected.push_back(x1); + + // Create from a factor graph + GaussianFactorGraph factorGraph = createGaussianFactorGraph(); + SymbolicFactorGraph fg(factorGraph); + + // eliminate it + Ordering ordering; + ordering += "x2","l1","x1"; + SymbolicBayesNet actual = fg.eliminate(ordering); + + CHECK(assert_equal(expected, actual)); +} + +/* ************************************************************************* */ +int main() { + TestResult tr; + return TestRegistry::runAllTests(tr); +} +/* ************************************************************************* */ diff --git a/tests/testSymbolicFactorGraph.cpp b/tests/testSymbolicFactorGraph.cpp new file mode 100644 index 000000000..123d7573e --- /dev/null +++ b/tests/testSymbolicFactorGraph.cpp @@ -0,0 +1,142 @@ +/** + * @file testSymbolicFactorGraph.cpp + * @brief Unit tests for a symbolic Factor Graph + * @author Frank Dellaert + */ + +#include // for operator += +using namespace boost::assign; + +#include + +#define GTSAM_MAGIC_KEY + +#include "Ordering.h" +#include "smallExample.h" +#include "SymbolicFactorGraph.h" +#include "SymbolicBayesNet.h" +#include "FactorGraph-inl.h" + +using namespace std; +using namespace gtsam; +using namespace example; + +/* ************************************************************************* */ +TEST( SymbolicFactorGraph, symbolicFactorGraph ) +{ + // construct expected symbolic graph + SymbolicFactorGraph expected; + expected.push_factor("x1"); + expected.push_factor("x1","x2"); + expected.push_factor("l1","x1"); + expected.push_factor("l1","x2"); + + // construct it from the factor graph + GaussianFactorGraph factorGraph = createGaussianFactorGraph(); + SymbolicFactorGraph actual(factorGraph); + + CHECK(assert_equal(expected, actual)); +} + +/* ************************************************************************* */ +TEST( SymbolicFactorGraph, findAndRemoveFactors ) +{ + // construct it from the factor graph graph + GaussianFactorGraph factorGraph = createGaussianFactorGraph(); + SymbolicFactorGraph actual(factorGraph); + SymbolicFactor::shared_ptr f1 = actual[0]; + SymbolicFactor::shared_ptr f3 = actual[2]; + actual.findAndRemoveFactors("x2"); + + // construct expected graph after find_factors_and_remove + SymbolicFactorGraph expected; + SymbolicFactor::shared_ptr null; + expected.push_back(f1); + expected.push_back(null); + expected.push_back(f3); + expected.push_back(null); + + CHECK(assert_equal(expected, actual)); +} +/* ************************************************************************* */ +TEST( SymbolicFactorGraph, factors) +{ + // create a test graph + GaussianFactorGraph factorGraph = createGaussianFactorGraph(); + SymbolicFactorGraph fg(factorGraph); + + // ask for all factor indices connected to x1 + list x1_factors = fg.factors("x1"); + int x1_indices[] = { 0, 1, 2 }; + list x1_expected(x1_indices, x1_indices + 3); + CHECK(x1_factors==x1_expected); + + // ask for all factor indices connected to x2 + list x2_factors = fg.factors("x2"); + int x2_indices[] = { 1, 3 }; + list x2_expected(x2_indices, x2_indices + 2); + CHECK(x2_factors==x2_expected); +} + +/* ************************************************************************* */ +TEST( SymbolicFactorGraph, removeAndCombineFactors ) +{ + // create a test graph + GaussianFactorGraph factorGraph = createGaussianFactorGraph(); + SymbolicFactorGraph fg(factorGraph); + + // combine all factors connected to x1 + SymbolicFactor::shared_ptr actual = removeAndCombineFactors(fg,"x1"); + + // check result + SymbolicFactor expected("l1","x1","x2"); + CHECK(assert_equal(expected,*actual)); +} + +/* ************************************************************************* */ +TEST( SymbolicFactorGraph, eliminateOne ) +{ + // create a test graph + GaussianFactorGraph factorGraph = createGaussianFactorGraph(); + SymbolicFactorGraph fg(factorGraph); + + // eliminate + SymbolicConditional::shared_ptr actual = fg.eliminateOne("x1"); + + // create expected symbolic Conditional + SymbolicConditional expected("x1","l1","x2"); + + CHECK(assert_equal(expected,*actual)); +} + +/* ************************************************************************* */ +TEST( GaussianFactorGraph, eliminate ) +{ + // create expected Chordal bayes Net + SymbolicConditional::shared_ptr x2(new SymbolicConditional("x2", "l1", "x1")); + SymbolicConditional::shared_ptr l1(new SymbolicConditional("l1", "x1")); + SymbolicConditional::shared_ptr x1(new SymbolicConditional("x1")); + + SymbolicBayesNet expected; + expected.push_back(x2); + expected.push_back(l1); + expected.push_back(x1); + + // create a test graph + GaussianFactorGraph factorGraph = createGaussianFactorGraph(); + SymbolicFactorGraph fg(factorGraph); + + // eliminate it + Ordering ordering; + ordering += "x2","l1","x1"; + SymbolicBayesNet actual = fg.eliminate(ordering); + + CHECK(assert_equal(expected,actual)); +} + +/* ************************************************************************* */ +int main() { + TestResult tr; + return TestRegistry::runAllTests(tr); +} +/* ************************************************************************* */ diff --git a/cpp/testTupleConfig.cpp b/tests/testTupleConfig.cpp similarity index 100% rename from cpp/testTupleConfig.cpp rename to tests/testTupleConfig.cpp diff --git a/cpp/timeGaussianFactorGraph.cpp b/tests/timeGaussianFactorGraph.cpp similarity index 100% rename from cpp/timeGaussianFactorGraph.cpp rename to tests/timeGaussianFactorGraph.cpp diff --git a/wrap/Makefile.am b/wrap/Makefile.am index 7748dad3a..d5a55e715 100644 --- a/wrap/Makefile.am +++ b/wrap/Makefile.am @@ -20,7 +20,7 @@ all: ./wrap ${interfacePath} ${moduleName} ${toolboxpath} ${nameSpace} ${mexFlags} # install the header files -include_HEADERS = utilities.h Argument.h Constructor.h Method.h Class.h Module.h wrap-matlab.h +include_HEADERS = geometry.h utilities.h Argument.h Constructor.h Method.h Class.h Module.h wrap-matlab.h install: all @@ -37,5 +37,3 @@ clean: # rule to run an executable %.run: % libgtsam.la ./$^ - - \ No newline at end of file