From baf4cf5a23108db2dab8f01b1b00e3ae19a16d70 Mon Sep 17 00:00:00 2001 From: kartik arcot Date: Mon, 23 Jan 2023 17:56:05 -0800 Subject: [PATCH] fix ordering --- gtsam/inference/Ordering.h | 11 +++++++++++ gtsam_unstable/CMakeLists.txt | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gtsam/inference/Ordering.h b/gtsam/inference/Ordering.h index ad41aa5bb..a308b9705 100644 --- a/gtsam/inference/Ordering.h +++ b/gtsam/inference/Ordering.h @@ -58,6 +58,7 @@ public: Base(keys.begin(), keys.end()) { } +#ifdef GTSAM_USE_BOOST_FEATURES /// Add new variables to the ordering as ordering += key1, key2, ... Equivalent to calling /// push_back. boost::assign::list_inserter > operator+=( @@ -65,6 +66,16 @@ public: return boost::assign::make_list_inserter( boost::assign_detail::call_push_back(*this))(key); } +#else + /** A simple inserter to insert one key at a time + * @param key The key to insert + * @return The ordering + */ + This& operator+=(Key key) { + push_back(key); + return *this; + } +#endif /** * @brief Append new keys to the ordering as `ordering += keys`. diff --git a/gtsam_unstable/CMakeLists.txt b/gtsam_unstable/CMakeLists.txt index d02731af0..db7c4f89e 100644 --- a/gtsam_unstable/CMakeLists.txt +++ b/gtsam_unstable/CMakeLists.txt @@ -34,12 +34,12 @@ if(NOT GTSAM_USE_BOOST_FEATURES) list (APPEND excluded_sources ${excluded_sources} "${CMAKE_CURRENT_SOURCE_DIR}/linear/QPSParser.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/linear/QPSSolver.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/linear/Scheduler.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/discrete/Scheduler.cpp" ) list (APPEND excluded_headers ${excluded_headers} "${CMAKE_CURRENT_SOURCE_DIR}/linear/QPSParser.h" "${CMAKE_CURRENT_SOURCE_DIR}/linear/QPSSolver.h" - "${CMAKE_CURRENT_SOURCE_DIR}/linear/Scheduler.h" + "${CMAKE_CURRENT_SOURCE_DIR}/discrete/Scheduler.h" ) endif()