Removed config.h and old testFactorgraph.cpp

release/4.3a0
Alex Cunningham 2010-07-12 13:25:58 +00:00
parent bbc4a1fced
commit a27072846f
2 changed files with 0 additions and 180 deletions

View File

@ -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 <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> 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 <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> 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 <sys/types.h> does not define. */
/* #undef size_t */

View File

@ -1,90 +0,0 @@
/**
* @file testFactorgraph.cpp
* @brief Unit tests for Factor Graphs
* @author Christian Potthast
**/
/*STL/C++*/
#include <list>
#include <iostream>
#include <boost/shared_ptr.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/assign/std/set.hpp> // for operator +=
using namespace boost::assign;
#include <CppUnitLite/TestHarness.h>
#define GTSAM_MAGIC_KEY
#include "SymbolicFactorGraph.h"
using namespace std;
using namespace gtsam;
typedef boost::shared_ptr<SymbolicFactorGraph> 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<Symbol> singletons;
boost::tie(singletonGraph, singletons) = G.removeSingletons();
set<Symbol> 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);
}
/* ************************************************************************* */