fix ordering

release/4.3a0
kartik arcot 2023-01-23 17:56:05 -08:00 committed by Frank Dellaert
parent de2e2899c8
commit baf4cf5a23
2 changed files with 13 additions and 2 deletions

View File

@ -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<boost::assign_detail::call_push_back<This> > operator+=(
@ -65,6 +66,16 @@ public:
return boost::assign::make_list_inserter(
boost::assign_detail::call_push_back<This>(*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`.

View File

@ -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()