Skip to content

Commit b1ec455

Browse files
authored
Merge pull request #203 from Simple-Robotics/topic/same-map-types
Change all map types to boost::unordered_map
2 parents e1ba5ff + fb71d48 commit b1ec455

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- All map types are now `boost::unordered_map` ([#203](https://github.com/Simple-Robotics/aligator/pull/203))
13+
1014
## [0.8.0] - 2024-09-18
1115

1216
### Added

include/aligator/solvers/fddp/solver-fddp.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "aligator/utils/logger.hpp"
1616
#include "aligator/threads.hpp"
1717

18-
#include <unordered_map>
18+
#include <boost/unordered_map.hpp>
1919

2020
/// @brief A warning for the FDDP module.
2121
#define ALIGATOR_FDDP_WARNING(msg) ALIGATOR_WARNING("SolverFDDP", msg)
@@ -42,7 +42,7 @@ template <typename Scalar> struct SolverFDDPTpl {
4242
using ExpModel = ExplicitDynamicsModelTpl<Scalar>;
4343
using ExplicitDynamicsData = ExplicitDynamicsDataTpl<Scalar>;
4444
using CallbackPtr = shared_ptr<CallbackBaseTpl<Scalar>>;
45-
using CallbackMap = std::unordered_map<std::string, CallbackPtr>;
45+
using CallbackMap = boost::unordered_map<std::string, CallbackPtr>;
4646

4747
Scalar target_tol_;
4848

include/aligator/solvers/proxddp/solver-proxddp.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include <proxsuite-nlp/bcl-params.hpp>
1818

19-
#include <unordered_map>
19+
#include <boost/unordered_map.hpp>
2020

2121
namespace aligator {
2222
namespace gar {
@@ -58,7 +58,7 @@ template <typename _Scalar> struct SolverProxDDPTpl {
5858
using ConstraintType = StageConstraintTpl<Scalar>;
5959
using StageData = StageDataTpl<Scalar>;
6060
using CallbackPtr = shared_ptr<CallbackBaseTpl<Scalar>>;
61-
using CallbackMap = std::unordered_map<std::string, CallbackPtr>;
61+
using CallbackMap = boost::unordered_map<std::string, CallbackPtr>;
6262
using ConstraintStack = ConstraintStackTpl<Scalar>;
6363
using CstrSet = ConstraintSetBase<Scalar>;
6464
using TrajOptData = TrajOptDataTpl<Scalar>;

include/aligator/utils/logger.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <array>
66
#include <string_view>
77
#include <vector>
8-
#include <map>
8+
#include <boost/unordered_map.hpp>
99

1010
namespace aligator {
1111
using uint = unsigned int;
@@ -54,8 +54,9 @@ struct Logger {
5454
protected:
5555
// sizes and formats
5656
std::vector<std::string_view> m_colNames;
57-
std::map<std::string_view, std::pair<uint, std::string>> m_colSpecs;
58-
std::map<std::string_view, std::string> m_currentLine;
57+
boost::unordered_map<std::string_view, std::pair<uint, std::string>>
58+
m_colSpecs;
59+
boost::unordered_map<std::string_view, std::string> m_currentLine;
5960
};
6061

6162
} // namespace aligator

0 commit comments

Comments
 (0)