diff --git a/include/core/state_block/has_state_blocks.h b/include/core/state_block/has_state_blocks.h index ade367fb88e7e0e987b087d31130dee0e78736ff..10aa727af1a0676527436d82e0a1fbc9cd22b64e 100644 --- a/include/core/state_block/has_state_blocks.h +++ b/include/core/state_block/has_state_blocks.h @@ -26,7 +26,7 @@ class HasStateBlocks void appendToStructure(const std::string& _frame_type){ structure_ += _frame_type; } bool isInStructure(const std::string& _sb_type) { return structure_.find(_sb_type) != std::string::npos; } - const std::map<std::string, StateBlockPtr>& getStateBlockMap() const; + const std::unordered_map<std::string, StateBlockPtr>& getStateBlockMap() const; std::vector<StateBlockPtr> getStateBlockVec() const; // Some typical shortcuts -- not all should be coded here, see notes below. @@ -64,15 +64,15 @@ class HasStateBlocks void removeStateBlocks(ProblemPtr _problem); // States - virtual void setState(const Eigen::VectorXd& _state, const bool _notify = true); + virtual void setState(const Eigen::VectorXd& _state, const bool _notify = true); Eigen::VectorXd getState() const; - void getState(Eigen::VectorXd& _state) const; - unsigned int getSize() const; - unsigned int getLocalSize() const; + void getState(Eigen::VectorXd& _state) const; + unsigned int getSize() const; + unsigned int getLocalSize() const; private: std::string structure_; - std::map<std::string, StateBlockPtr> state_block_map_; + std::unordered_map<std::string, StateBlockPtr> state_block_map_; }; @@ -97,7 +97,7 @@ inline HasStateBlocks::~HasStateBlocks() // } -inline const std::map<std::string, StateBlockPtr>& HasStateBlocks::getStateBlockMap() const +inline const std::unordered_map<std::string, StateBlockPtr>& HasStateBlocks::getStateBlockMap() const { return state_block_map_; }