From a27072846fd402d5a17d8bba025d73f572635f80 Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Mon, 12 Jul 2010 13:25:58 +0000 Subject: [PATCH] Removed config.h and old testFactorgraph.cpp --- config.h | 90 ----------------------------------------- cpp/testFactorgraph.cpp | 90 ----------------------------------------- 2 files changed, 180 deletions(-) delete mode 100644 config.h delete mode 100644 cpp/testFactorgraph.cpp diff --git a/config.h b/config.h deleted file mode 100644 index 593fdb1cb..000000000 --- a/config.h +++ /dev/null @@ -1,90 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* 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. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `pow' function. */ -#define HAVE_POW 1 - -/* Define to 1 if you have the `sqrt' function. */ -#define HAVE_SQRT 1 - -/* Define to 1 if stdbool.h conforms to C99. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gtsam" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "dellaert@cc.gatech.edu" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gtsam" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gtsam 0.0.0" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gtsam" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.0.0" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "0.0.0" - -/* 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/cpp/testFactorgraph.cpp b/cpp/testFactorgraph.cpp deleted file mode 100644 index 05b76d219..000000000 --- a/cpp/testFactorgraph.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/** - * @file testFactorgraph.cpp - * @brief Unit tests for Factor Graphs - * @author Christian Potthast - **/ - -/*STL/C++*/ -#include -#include -#include -#include -#include // for operator += -using namespace boost::assign; - -#include - -#define GTSAM_MAGIC_KEY -#include "SymbolicFactorGraph.h" - -using namespace std; -using namespace gtsam; - -typedef boost::shared_ptr shared; - -/* ************************************************************************* */ -TEST( FactorGraph, splitMinimumSpanningTree ) -{ - SymbolicFactorGraph G; - G.push_factor("x1", "x2"); - G.push_factor("x1", "x3"); - G.push_factor("x1", "x4"); - G.push_factor("x2", "x3"); - G.push_factor("x2", "x4"); - G.push_factor("x3", "x4"); - - SymbolicFactorGraph T, C; - boost::tie(T, C) = G.splitMinimumSpanningTree(); - - SymbolicFactorGraph expectedT, expectedC; - expectedT.push_factor("x1", "x2"); - expectedT.push_factor("x1", "x3"); - expectedT.push_factor("x1", "x4"); - expectedC.push_factor("x2", "x3"); - expectedC.push_factor("x2", "x4"); - expectedC.push_factor("x3", "x4"); - CHECK(assert_equal(expectedT,T)); - CHECK(assert_equal(expectedC,C)); -} - -/* ************************************************************************* */ -/** - * x1 - x2 - x3 - x4 - x5 - * | | / | - * l1 l2 l3 - */ -TEST( FactorGraph, removeSingletons ) -{ - SymbolicFactorGraph G; - G.push_factor("x1", "x2"); - G.push_factor("x2", "x3"); - G.push_factor("x3", "x4"); - G.push_factor("x4", "x5"); - G.push_factor("x2", "l1"); - G.push_factor("x3", "l2"); - G.push_factor("x4", "l2"); - G.push_factor("x4", "l3"); - - SymbolicFactorGraph singletonGraph; - set singletons; - boost::tie(singletonGraph, singletons) = G.removeSingletons(); - - set singletons_excepted; singletons_excepted += "x1", "x2", "x5", "l1", "l3"; - CHECK(singletons_excepted == singletons); - - SymbolicFactorGraph singletonGraph_excepted; - singletonGraph_excepted.push_factor("x2", "l1"); - singletonGraph_excepted.push_factor("x4", "l3"); - singletonGraph_excepted.push_factor("x1", "x2"); - singletonGraph_excepted.push_factor("x4", "x5"); - singletonGraph_excepted.push_factor("x2", "x3"); - CHECK(singletonGraph_excepted.equals(singletonGraph)); -} - - -/* ************************************************************************* */ -int main() { - TestResult tr; - return TestRegistry::runAllTests(tr); -} -/* ************************************************************************* */