Some cleanup of headers/old code

release/4.3a0
dellaert 2014-09-30 12:12:17 +02:00
parent e789de2353
commit e2f6f01941
2 changed files with 5 additions and 22 deletions

View File

@ -18,11 +18,7 @@
*/
#include <gtsam/nonlinear/NonlinearFactor.h>
#include <gtsam/geometry/Pose3.h>
#include <gtsam/geometry/Cal3_S2.h>
#include <gtsam/slam/GeneralSFMFactor.h>
#include <gtsam/inference/Key.h>
#include <gtsam/base/Testable.h>
#include <boost/make_shared.hpp>
#include <boost/foreach.hpp>
@ -327,24 +323,6 @@ Expression<T> operator*(const Expression<T>& expression1,
expression1, expression2);
}
// http://stackoverflow.com/questions/16260445/boost-bind-to-operator
template<class E1, class E2>
struct apply_product {
typedef E2 result_type;
E2 operator()(E1 const& x, E2 const& y) const {
return x * y;
}
};
/// Construct a product expression, assumes E1 * E2 -> E1
template<typename E1, typename E2>
Expression<E2> operator*(const Expression<E1>& expression1,
const Expression<E2>& expression2) {
using namespace boost;
return Expression<E2>(boost::bind(apply_product<E1, E2>(), _1, _2),
expression1, expression2);
}
//-----------------------------------------------------------------------------
/// AD Factor
template<class T>

View File

@ -17,7 +17,12 @@
* @brief unit tests for Block Automatic Differentiation
*/
#include <gtsam/slam/GeneralSFMFactor.h>
#include <gtsam/geometry/Pose3.h>
#include <gtsam/geometry/Cal3_S2.h>
#include <gtsam_unstable/base/Expression.h>
#include <gtsam/base/Testable.h>
#include <CppUnitLite/TestHarness.h>
using namespace std;