robotology / wearables

Code moved to https://github.com/robotology/human-dynamics-estimation
https://github.com/robotology/human-dynamics-estimation
BSD 3-Clause "New" or "Revised" License
19 stars 11 forks source link

Use std::mutex instead of std::recursive_mutex in IWearRemapper #174

Closed RiccardoGrieco closed 2 years ago

RiccardoGrieco commented 2 years ago

This PR introduces the following 2 changes in IWearRemapper:

lrapetti commented 2 years ago

@RiccardoGrieco let me know when the PR is ready to be checked (in latest tests was not working properly)

RiccardoGrieco commented 2 years ago

As per discussion with @lrapetti we will implement the following changes:

RiccardoGrieco commented 2 years ago

With b0d1127 I also switched from std::map to std::unordered_map. The first one has an access time that is O(log(n)) w.r.t. the number of sensor, while the second one's access time is O(1). Since we do not have cases where the order is important, it seems safe to me to switch to that one.

RiccardoGrieco commented 2 years ago

Thanks @lrapetti, merging.